• Home
  • Raw
  • Download

Lines Matching refs:strm

75 static void flush_pending  (z_streamp strm);
76 static int read_buf (z_streamp strm, Byte *buf, unsigned size);
168 z_streamp strm, in zlib_deflateInit2() argument
186 if (strm == NULL) return Z_STREAM_ERROR; in zlib_deflateInit2()
188 strm->msg = NULL; in zlib_deflateInit2()
192 mem = (deflate_workspace *) strm->workspace; in zlib_deflateInit2()
219 strm->state = (struct internal_state *)s; in zlib_deflateInit2()
220 s->strm = strm; in zlib_deflateInit2()
249 return zlib_deflateReset(strm); in zlib_deflateInit2()
254 z_streamp strm in zlib_deflateReset() argument
259 if (strm == NULL || strm->state == NULL) in zlib_deflateReset()
262 strm->total_in = strm->total_out = 0; in zlib_deflateReset()
263 strm->msg = NULL; in zlib_deflateReset()
264 strm->data_type = Z_UNKNOWN; in zlib_deflateReset()
266 s = (deflate_state *)strm->state; in zlib_deflateReset()
274 strm->adler = 1; in zlib_deflateReset()
304 z_streamp strm in flush_pending() argument
307 deflate_state *s = (deflate_state *) strm->state; in flush_pending()
310 if (len > strm->avail_out) len = strm->avail_out; in flush_pending()
313 if (strm->next_out != NULL) { in flush_pending()
314 memcpy(strm->next_out, s->pending_out, len); in flush_pending()
315 strm->next_out += len; in flush_pending()
318 strm->total_out += len; in flush_pending()
319 strm->avail_out -= len; in flush_pending()
328 z_streamp strm, in zlib_deflate() argument
335 if (strm == NULL || strm->state == NULL || in zlib_deflate()
339 s = (deflate_state *) strm->state; in zlib_deflate()
341 if ((strm->next_in == NULL && strm->avail_in != 0) || in zlib_deflate()
345 if (strm->avail_out == 0) return Z_BUF_ERROR; in zlib_deflate()
347 s->strm = strm; /* just in case */ in zlib_deflate()
367 putShortMSB(s, (uInt)(strm->adler >> 16)); in zlib_deflate()
368 putShortMSB(s, (uInt)(strm->adler & 0xffff)); in zlib_deflate()
370 strm->adler = 1L; in zlib_deflate()
375 flush_pending(strm); in zlib_deflate()
376 if (strm->avail_out == 0) { in zlib_deflate()
391 } else if (strm->avail_in == 0 && flush <= old_flush && in zlib_deflate()
397 if (s->status == FINISH_STATE && strm->avail_in != 0) { in zlib_deflate()
403 if (strm->avail_in != 0 || s->lookahead != 0 || in zlib_deflate()
413 if (strm->avail_out == 0) { in zlib_deflate()
441 flush_pending(strm); in zlib_deflate()
442 if (strm->avail_out == 0) { in zlib_deflate()
448 Assert(strm->avail_out > 0, "bug2"); in zlib_deflate()
454 putShortMSB(s, (uInt)(strm->adler >> 16)); in zlib_deflate()
455 putShortMSB(s, (uInt)(strm->adler & 0xffff)); in zlib_deflate()
456 flush_pending(strm); in zlib_deflate()
466 z_streamp strm in zlib_deflateEnd() argument
472 if (strm == NULL || strm->state == NULL) return Z_STREAM_ERROR; in zlib_deflateEnd()
473 s = (deflate_state *) strm->state; in zlib_deflateEnd()
481 strm->state = NULL; in zlib_deflateEnd()
494 z_streamp strm, in read_buf() argument
499 unsigned len = strm->avail_in; in read_buf()
504 strm->avail_in -= len; in read_buf()
506 if (!((deflate_state *)(strm->state))->noheader) { in read_buf()
507 strm->adler = zlib_adler32(strm->adler, strm->next_in, len); in read_buf()
509 memcpy(buf, strm->next_in, len); in read_buf()
510 strm->next_in += len; in read_buf()
511 strm->total_in += len; in read_buf()
790 if (s->strm->avail_in == 0) return; in fill_window()
805 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); in fill_window()
820 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); in fill_window()
834 flush_pending(s->strm); \
841 if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
1103 if (s->strm->avail_out == 0) return need_more; in deflate_slow()