Lines Matching refs:czd_zstr
69 z_stream czd_zstr; member
158 if (zlib.z_initcomp(&czd->czd_zstr, Z_BEST_COMPRESSION, in ctf_zdata_init()
185 czd->czd_zstr.next_out = (Bytef *)czd->czd_next; in ctf_zdata_grow()
186 czd->czd_zstr.avail_out = CTF_COMPRESS_CHUNK; in ctf_zdata_grow()
195 czd->czd_zstr.next_out = czd->czd_next; in ctf_zdata_compress_buffer()
196 czd->czd_zstr.avail_out = czd->czd_allocsz - in ctf_zdata_compress_buffer()
198 czd->czd_zstr.next_in = (Bytef *)buf; in ctf_zdata_compress_buffer()
199 czd->czd_zstr.avail_in = bufsize; in ctf_zdata_compress_buffer()
201 while (czd->czd_zstr.avail_in != 0) { in ctf_zdata_compress_buffer()
202 if (czd->czd_zstr.avail_out == 0) { in ctf_zdata_compress_buffer()
203 czd->czd_next = czd->czd_zstr.next_out; in ctf_zdata_compress_buffer()
209 if ((err = zlib.z_compress(&czd->czd_zstr, Z_NO_FLUSH)) != Z_OK) in ctf_zdata_compress_buffer()
212 czd->czd_next = czd->czd_zstr.next_out; in ctf_zdata_compress_buffer()
225 if (czd->czd_zstr.avail_out == 0) { in ctf_zdata_flush()
226 czd->czd_next = czd->czd_zstr.next_out; in ctf_zdata_flush()
232 err = zlib.z_compress(&czd->czd_zstr, flag); in ctf_zdata_flush()
241 czd->czd_next = czd->czd_zstr.next_out; in ctf_zdata_flush()
254 if ((ret = zlib.z_finicomp(&czd->czd_zstr)) != 0) in ctf_zdata_end()
264 (void) zlib.z_finicomp(&czd->czd_zstr); in ctf_zdata_cleanup()