Lines Matching refs:strm
42 struct z_stream_s *strm; in gunzip() local
69 strm = malloc(sizeof(*strm)); in gunzip()
70 if (strm == NULL) { in gunzip()
75 strm->workspace = malloc(flush ? zlib_inflate_workspacesize() : in gunzip()
77 if (strm->workspace == NULL) { in gunzip()
100 strm->next_in = zbuf + 10; in gunzip()
101 strm->avail_in = len - 10; in gunzip()
110 if (strm->avail_in == 0) { in gunzip()
114 --strm->avail_in; in gunzip()
115 } while (*strm->next_in++); in gunzip()
118 strm->next_out = out_buf; in gunzip()
119 strm->avail_out = out_len; in gunzip()
121 rc = zlib_inflateInit2(strm, -MAX_WBITS); in gunzip()
124 WS(strm)->inflate_state.wsize = 0; in gunzip()
125 WS(strm)->inflate_state.window = NULL; in gunzip()
129 if (strm->avail_in == 0) { in gunzip()
137 strm->next_in = zbuf; in gunzip()
138 strm->avail_in = len; in gunzip()
140 rc = zlib_inflate(strm, 0); in gunzip()
143 if (flush && strm->next_out > out_buf) { in gunzip()
144 int l = strm->next_out - out_buf; in gunzip()
150 strm->next_out = out_buf; in gunzip()
151 strm->avail_out = out_len; in gunzip()
164 zlib_inflateEnd(strm); in gunzip()
167 *pos = strm->next_in - zbuf+8; in gunzip()
170 free(strm->workspace); in gunzip()
172 free(strm); in gunzip()