Lines Matching refs:zstr
49 z_stream zstr; member
112 ctx->zstr.next_out = (Bytef *)data; in compress_read()
113 ctx->zstr.avail_out = out_len; in compress_read()
117 ret = deflate(&ctx->zstr, ctx->eof ? Z_FINISH : 0); in compress_read()
121 if (ctx->can_store && ctx->zstr.total_in <= ctx->zstr.total_out) { in compress_read()
123 ctx->size = ctx->zstr.total_in; in compress_read()
131 if (ctx->zstr.avail_out == 0) { in compress_read()
135 ctx->zstr.next_out = (Bytef *)data+out_offset; in compress_read()
136 ctx->zstr.avail_out = out_len; in compress_read()
143 else if (ctx->eof && ctx->zstr.avail_in == 0) in compress_read()
148 if (ctx->zstr.avail_in == 0) { in compress_read()
162 ctx->size = ctx->zstr.total_in; in compress_read()
165 if (ctx->zstr.total_in > 0) { in compress_read()
169 ctx->zstr.next_in = (Bytef *)ctx->buffer; in compress_read()
170 ctx->zstr.avail_in = (uInt)n; in compress_read()
186 if (ctx->zstr.avail_out < len) { in compress_read()
188 return (zip_int64_t)(len - ctx->zstr.avail_out); in compress_read()
211 ctx->zstr.next_out = (Bytef *)data; in decompress_read()
212 ctx->zstr.avail_out = out_len; in decompress_read()
216 ret = inflate(&ctx->zstr, Z_SYNC_FLUSH); in decompress_read()
220 if (ctx->zstr.avail_out == 0) { in decompress_read()
224 ctx->zstr.next_out = (Bytef *)data+out_offset; in decompress_read()
225 ctx->zstr.avail_out = out_len; in decompress_read()
239 if (ctx->zstr.avail_in == 0) { in decompress_read()
254 ctx->zstr.next_in = (Bytef *)ctx->buffer; in decompress_read()
255 ctx->zstr.avail_in = (uInt)n; in decompress_read()
270 if (ctx->zstr.avail_out < len) in decompress_read()
271 return (zip_int64_t)(len - ctx->zstr.avail_out); in decompress_read()
287 ctx->zstr.zalloc = Z_NULL; in deflate_compress()
288 ctx->zstr.zfree = Z_NULL; in deflate_compress()
289 ctx->zstr.opaque = NULL; in deflate_compress()
290 ctx->zstr.avail_in = 0; in deflate_compress()
291 ctx->zstr.next_in = NULL; in deflate_compress()
292 ctx->zstr.avail_out = 0; in deflate_compress()
293 ctx->zstr.next_out = NULL; in deflate_compress()
296 …if ((ret=deflateInit2(&ctx->zstr, Z_BEST_COMPRESSION, Z_DEFLATED, -MAX_WBITS, ctx->mem_level, Z_DE… in deflate_compress()
307 deflateEnd(&ctx->zstr); in deflate_compress()
361 ctx->zstr.zalloc = Z_NULL; in deflate_decompress()
362 ctx->zstr.zfree = Z_NULL; in deflate_decompress()
363 ctx->zstr.opaque = NULL; in deflate_decompress()
364 ctx->zstr.next_in = (Bytef *)ctx->buffer; in deflate_decompress()
365 ctx->zstr.avail_in = (uInt)n; in deflate_decompress()
368 if ((ret=inflateInit2(&ctx->zstr, -MAX_WBITS)) != Z_OK) { in deflate_decompress()
378 inflateEnd(&ctx->zstr); in deflate_decompress()