Lines Matching refs:strm
45 struct z_stream_s *strm; in __gunzip() local
72 strm = malloc(sizeof(*strm)); in __gunzip()
73 if (strm == NULL) { in __gunzip()
78 strm->workspace = malloc(flush ? zlib_inflate_workspacesize() : in __gunzip()
80 if (strm->workspace == NULL) { in __gunzip()
103 strm->next_in = zbuf + 10; in __gunzip()
104 strm->avail_in = len - 10; in __gunzip()
113 if (strm->avail_in == 0) { in __gunzip()
117 --strm->avail_in; in __gunzip()
118 } while (*strm->next_in++); in __gunzip()
121 strm->next_out = out_buf; in __gunzip()
122 strm->avail_out = out_len; in __gunzip()
124 rc = zlib_inflateInit2(strm, -MAX_WBITS); in __gunzip()
127 WS(strm)->inflate_state.wsize = 0; in __gunzip()
128 WS(strm)->inflate_state.window = NULL; in __gunzip()
132 if (strm->avail_in == 0) { in __gunzip()
140 strm->next_in = zbuf; in __gunzip()
141 strm->avail_in = len; in __gunzip()
143 rc = zlib_inflate(strm, 0); in __gunzip()
146 if (flush && strm->next_out > out_buf) { in __gunzip()
147 long l = strm->next_out - out_buf; in __gunzip()
153 strm->next_out = out_buf; in __gunzip()
154 strm->avail_out = out_len; in __gunzip()
167 zlib_inflateEnd(strm); in __gunzip()
170 *pos = strm->next_in - zbuf+8; in __gunzip()
173 free(strm->workspace); in __gunzip()
175 free(strm); in __gunzip()