+ fprintf(c_fp, "\tmemcpy(buf, v, v->siz + sizeof v);\n");
+ fprintf(c_fp, "}\n\n");
+
+ fprintf(c_fp, "__attribute__((unused)) static void recv_CompressedBlob(DragonnetPeer *p, void *buf)\n");
+ fprintf(c_fp, "{\n");
+ fprintf(c_fp, "\tCompressedBlob v = *(CompressedBlob *) buf;\n");
+ fprintf(c_fp, "\trecv_n32(p, &v->compr_siz);\n");
+ fprintf(c_fp, "\trecv_n32(p, &v->siz);\n");
+ fprintf(c_fp, "\tv->data = malloc(v->siz);\n\n");
+ fprintf(c_fp, "\tchar compr[v->compr_siz];\n");
+ fprintf(c_fp, "\tdragonnet_recv_raw(p, compr, sizeof compr);\n\n");
+ fprintf(c_fp, "\tz_stream s;\n");
+ fprintf(c_fp, "\ts.zalloc = Z_NULL;\n");
+ fprintf(c_fp, "\ts.zfree = Z_NULL;\n");
+ fprintf(c_fp, "\ts.opaque = Z_NULL;\n\n");
+ fprintf(c_fp, "\ts.avail_in = v->compr_siz;\n");
+ fprintf(c_fp, "\ts.next_in = (Bytef *) compr;\n");
+ fprintf(c_fp, "\ts.avail_out = v->siz;\n");
+ fprintf(c_fp, "\ts.next_out = (Bytef *) v->data;\n\n");
+ fprintf(c_fp, "\tinflateInit(&s);\n");
+ fprintf(c_fp, "\tinflate(&s, Z_NO_FLUSH);\n");
+ fprintf(c_fp, "\tinflateEnd(&s);\n");