X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=libcitadel%2Flib%2Fstringbuf.c;fp=libcitadel%2Flib%2Fstringbuf.c;h=9ebc2dd593616ef94b2c9f94cd46563e8d188c87;hp=5d196112385d5a11883126692be869720b585d90;hb=5249c9ab6b14efd4d0f92cb64afd78bff3f7e163;hpb=dbff3f19efefa1488dbd811d702069add21f264d diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index 5d1961123..9ebc2dd59 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -2898,25 +2898,21 @@ void *StrBufNewStreamContext(eStreamType type) memset(stream, 0, sizeof(z_enc_stream)); stream->OutBuf.BufSize = 4*SIZ; /// todo 64 stream->OutBuf.buf = (char*)malloc(stream->OutBuf.BufSize); - /* write gzip header * / + /* write gzip header */ stream->OutBuf.BufUsed = snprintf (stream->OutBuf.buf, stream->OutBuf.BufSize, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], Z_DEFLATED, - 0 /*flags * / , 0, 0, 0, 0 /*time * / , 0 /* xflags * / , + 0 /*flags */ , 0, 0, 0, 0 /*time */ , 0 /* xflags */ , OS_CODE); -/* + err = deflateInit2(&stream->zstream, ZLibCompressionRatio, Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -*/ - err = deflateInit(&stream->zstream, - ZLibCompressionRatio); - if (err != Z_OK) return NULL;/// tODO cleanup return stream;