Home | History | Annotate | Download | only in examples

Lines Matching refs:strm

254 local void zpull(z_streamp strm, bin *in)
260 strm->avail_in = in->left;
261 strm->next_in = in->next;
289 z_stream strm; /* zlib inflate stream */
300 strm.zalloc = Z_NULL;
301 strm.zfree = Z_NULL;
302 strm.opaque = Z_NULL;
303 strm.avail_in = 0;
304 strm.next_in = Z_NULL;
305 ret = inflateInit2(&strm, -15);
311 zpull(&strm, in);
316 strm.avail_out = 0;
319 if (strm.avail_in == 0 && strm.avail_out != 0) {
320 fwrite(start, 1, strm.next_in - start, out);
323 zpull(&strm, in);
327 strm.avail_out = CHUNK;
328 strm.next_out = junk;
329 ret = inflate(&strm, Z_BLOCK);
338 len += CHUNK - strm.avail_out;
341 if (strm.data_type & 128) {
347 pos = strm.data_type & 7;
353 last = strm.next_in[-1] & pos;
355 in->buf[strm.next_in - in->buf - 1] &= ~pos;
359 if (strm.avail_in == 0) {
361 fwrite(start, 1, strm.next_in - start, out);
364 zpull(&strm, in);
366 last = strm.next_in[0] & 1;
368 in->buf[strm.next_in - in->buf] &= ~1;
374 in->left = strm.avail_in;
375 in->next = in->buf + (strm.next_in - in->buf);
378 pos = strm.data_type & 7;
415 inflateEnd(&strm);