Lines Matching refs:zf_zstream
39 z_stream zf_zstream; member
68 req = Z_BUFSIZE - zf->zf_zstream.avail_in; in zf_fill()
78 result = read(zf->zf_rawfd, zf->zf_buf + zf->zf_zstream.avail_in, req); in zf_fill()
79 zf->zf_zstream.next_in = zf->zf_buf; in zf_fill()
81 zf->zf_zstream.avail_in += result; in zf_fill()
94 if ((zf->zf_zstream.avail_in == 0) && (zf_fill(zf) == -1)) in get_byte()
96 zf->zf_zstream.avail_in--; in get_byte()
98 return(*(zf->zf_zstream.next_in)++); in get_byte()
212 if ((error = inflateInit2(&(zf->zf_zstream), -15)) != Z_OK) { in zf_open()
213 printf("zf_open: inflateInit returned %d : %s\n", error, zf->zf_zstream.msg); in zf_open()
229 inflateEnd(&(zf->zf_zstream)); in zf_close()
241 zf->zf_zstream.next_out = buf; /* where and how much */ in zf_read()
242 zf->zf_zstream.avail_out = size; in zf_read()
244 while (zf->zf_zstream.avail_out && zf->zf_endseen == 0) { in zf_read()
245 if ((zf->zf_zstream.avail_in == 0) && (zf_fill(zf) == -1)) { in zf_read()
249 if (zf->zf_zstream.avail_in == 0) { /* oops, unexpected EOF */ in zf_read()
251 if (zf->zf_zstream.avail_out == size) in zf_read()
256 error = inflate(&zf->zf_zstream, Z_SYNC_FLUSH); /* decompression pass */ in zf_read()
262 printf("inflate: %s\n", zf->zf_zstream.msg); in zf_read()
267 *resid = zf->zf_zstream.avail_out; in zf_read()
278 zf->zf_zstream.avail_in = 0; in zf_rewind()
279 zf->zf_zstream.next_in = NULL; in zf_rewind()
281 (void)inflateReset(&zf->zf_zstream); in zf_rewind()
298 target = offset + zf->zf_zstream.total_out; in zf_seek()
306 if (target < zf->zf_zstream.total_out && zf_rewind(f) != 0) in zf_seek()
310 while (target > zf->zf_zstream.total_out) { in zf_seek()
312 target - zf->zf_zstream.total_out), NULL); in zf_seek()
320 return(zf->zf_zstream.total_out); in zf_seek()