Lines Matching refs:strm

59 #define DEFLATE_RESET_HOOK(strm) do {} while (0)  argument
60 #define DEFLATE_HOOK(strm, flush, bstate) 0 argument
61 #define DEFLATE_NEED_CHECKSUM(strm) 1 argument
78 static int read_buf (z_streamp strm, Byte *buf, unsigned size);
189 z_streamp strm, in zlib_deflateInit2() argument
207 if (strm == NULL) return Z_STREAM_ERROR; in zlib_deflateInit2()
209 strm->msg = NULL; in zlib_deflateInit2()
213 mem = (deflate_workspace *) strm->workspace; in zlib_deflateInit2()
248 strm->state = (struct internal_state *)s; in zlib_deflateInit2()
249 s->strm = strm; in zlib_deflateInit2()
278 return zlib_deflateReset(strm); in zlib_deflateInit2()
283 z_streamp strm in zlib_deflateReset() argument
288 if (strm == NULL || strm->state == NULL) in zlib_deflateReset()
291 strm->total_in = strm->total_out = 0; in zlib_deflateReset()
292 strm->msg = NULL; in zlib_deflateReset()
293 strm->data_type = Z_UNKNOWN; in zlib_deflateReset()
295 s = (deflate_state *)strm->state; in zlib_deflateReset()
303 strm->adler = 1; in zlib_deflateReset()
309 DEFLATE_RESET_HOOK(strm); in zlib_deflateReset()
330 z_streamp strm, in zlib_deflate() argument
337 if (strm == NULL || strm->state == NULL || in zlib_deflate()
341 s = (deflate_state *) strm->state; in zlib_deflate()
343 if ((strm->next_in == NULL && strm->avail_in != 0) || in zlib_deflate()
347 if (strm->avail_out == 0) return Z_BUF_ERROR; in zlib_deflate()
349 s->strm = strm; /* just in case */ in zlib_deflate()
369 putShortMSB(s, (uInt)(strm->adler >> 16)); in zlib_deflate()
370 putShortMSB(s, (uInt)(strm->adler & 0xffff)); in zlib_deflate()
372 strm->adler = 1L; in zlib_deflate()
377 flush_pending(strm); in zlib_deflate()
378 if (strm->avail_out == 0) { in zlib_deflate()
393 } else if (strm->avail_in == 0 && flush <= old_flush && in zlib_deflate()
399 if (s->status == FINISH_STATE && strm->avail_in != 0) { in zlib_deflate()
405 if (strm->avail_in != 0 || s->lookahead != 0 || in zlib_deflate()
409 bstate = DEFLATE_HOOK(strm, flush, &bstate) ? bstate : in zlib_deflate()
416 if (strm->avail_out == 0) { in zlib_deflate()
444 flush_pending(strm); in zlib_deflate()
445 if (strm->avail_out == 0) { in zlib_deflate()
451 Assert(strm->avail_out > 0, "bug2"); in zlib_deflate()
457 putShortMSB(s, (uInt)(strm->adler >> 16)); in zlib_deflate()
458 putShortMSB(s, (uInt)(strm->adler & 0xffff)); in zlib_deflate()
460 flush_pending(strm); in zlib_deflate()
476 z_streamp strm in zlib_deflateEnd() argument
482 if (strm == NULL || strm->state == NULL) return Z_STREAM_ERROR; in zlib_deflateEnd()
483 s = (deflate_state *) strm->state; in zlib_deflateEnd()
491 strm->state = NULL; in zlib_deflateEnd()
504 z_streamp strm, in read_buf() argument
509 unsigned len = strm->avail_in; in read_buf()
514 strm->avail_in -= len; in read_buf()
516 if (!DEFLATE_NEED_CHECKSUM(strm)) {} in read_buf()
517 else if (!((deflate_state *)(strm->state))->noheader) { in read_buf()
518 strm->adler = zlib_adler32(strm->adler, strm->next_in, len); in read_buf()
520 memcpy(buf, strm->next_in, len); in read_buf()
521 strm->next_in += len; in read_buf()
522 strm->total_in += len; in read_buf()
801 if (s->strm->avail_in == 0) return; in fill_window()
816 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); in fill_window()
831 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); in fill_window()
845 flush_pending(s->strm); \
852 if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
1114 if (s->strm->avail_out == 0) return need_more; in deflate_slow()