Lines Matching defs:zbuf
49 #define ZBUF 10
85 z_stream zbuf;
89 struct deflate_buf buf[ZBUF];
93 memset(&zbuf, 0, sizeof(z_stream));
94 zbuf.next_in = data; /* data that is going to be processed */
95 zbuf.zalloc = ocf_zalloc;
96 zbuf.zfree = ocf_zfree;
97 zbuf.opaque = Z_NULL;
98 zbuf.avail_in = size; /* Total length of data to be processed */
117 zbuf.next_out = buf[0].out;
118 zbuf.avail_out = buf[0].size;
120 error = decomp ? inflateInit2(&zbuf, window_inflate) :
121 deflateInit2(&zbuf, Z_DEFAULT_COMPRESSION, Z_METHOD,
127 error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) :
128 deflate(&zbuf, Z_FINISH);
141 && zbuf.avail_in == 0 && zbuf.avail_out != 0)
145 else if (zbuf.avail_out == 0) {
148 if (i == ZBUF || nextsize > 1000000)
153 zbuf.next_out = buf[i].out;
154 zbuf.avail_out = buf[i].size = nextsize;
159 result = count = zbuf.total_out;
180 inflateEnd(&zbuf);
182 deflateEnd(&zbuf);
187 inflateEnd(&zbuf);
189 deflateEnd(&zbuf);
231 z_stream zbuf;
235 struct deflate_buf buf[ZBUF];
241 memset(&zbuf, 0, sizeof(z_stream));
242 zbuf.zalloc = ocf_zalloc;
243 zbuf.zfree = ocf_zfree;
244 zbuf.opaque = Z_NULL;
255 zbuf.avail_in = size; /* Total length of data to be processed */
256 zbuf.next_in = data; /* data that is going to be processed */
297 zbuf.next_in = data + sizeof(gzip_header);
300 zbuf.avail_in = size - sizeof(gzip_header) - GZIP_TAIL_SIZE;
306 zbuf.next_out = buf[0].out;
307 zbuf.avail_out = buf[0].size;
308 DPRINTF("zbuf avail_in %u, avail_out %u\n",
309 zbuf.avail_in, zbuf.avail_out);
312 error = decomp ? inflateInit2(&zbuf, window_inflate) :
313 deflateInit2(&zbuf, Z_DEFAULT_COMPRESSION, Z_METHOD,
322 zbuf.avail_in, zbuf.avail_out);
323 error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) :
324 deflate(&zbuf, Z_FINISH);
326 zbuf.avail_in, zbuf.avail_out);
335 && zbuf.avail_in == 0 && zbuf.avail_out != 0)
339 else if (zbuf.avail_out == 0) {
342 if (i == ZBUF || nextsize > 1000000)
347 zbuf.next_out = buf[i].out;
348 zbuf.avail_out = buf[i].size = nextsize;
354 count = result = zbuf.total_out;
357 result = zbuf.total_out + sizeof(gzip_header) + GZIP_TAIL_SIZE;
358 count = zbuf.total_out;
368 inflateEnd(&zbuf);
370 deflateEnd(&zbuf);
421 inflateEnd(&zbuf);
423 deflateEnd(&zbuf);