• Home
  • Raw
  • Download

Lines Matching refs:stream

57     z_stream stream;  member
115 s->stream.zalloc = (alloc_func)0;
116 s->stream.zfree = (free_func)0;
117 s->stream.opaque = (voidpf)0;
118 s->stream.next_in = s->inbuf = Z_NULL;
119 s->stream.next_out = s->outbuf = Z_NULL;
120 s->stream.avail_in = s->stream.avail_out = 0;
159 err = deflateInit2(&(s->stream), level,
163 s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
169 s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
171 err = inflateInit2(&(s->stream), -MAX_WBITS);
182 s->stream.avail_out = Z_BUFSIZE;
203 s->start = ftell(s->file) - s->stream.avail_in;
248 if (s->stream.avail_out == 0) {
250 s->stream.next_out = s->outbuf;
254 s->stream.avail_out = Z_BUFSIZE;
257 return deflateParams (&(s->stream), level, strategy);
269 if (s->stream.avail_in == 0) {
271 s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
272 if (s->stream.avail_in == 0) {
277 s->stream.next_in = s->inbuf;
279 s->stream.avail_in--;
280 return *(s->stream.next_in)++;
303 len = s->stream.avail_in;
305 if (len) s->inbuf[0] = s->stream.next_in[0];
309 s->stream.avail_in += len;
310 s->stream.next_in = s->inbuf;
311 if (s->stream.avail_in < 2) {
312 s->transparent = s->stream.avail_in;
318 if (s->stream.next_in[0] != gz_magic[0] ||
319 s->stream.next_in[1] != gz_magic[1]) {
323 s->stream.avail_in -= 2;
324 s->stream.next_in += 2;
368 if (s->stream.state != NULL) {
373 err = deflateEnd(&(s->stream));
376 err = inflateEnd(&(s->stream));
413 s->stream.next_out = (Bytef*)buf;
414 s->stream.avail_out = len;
416 if (s->stream.avail_out && s->back != EOF) {
418 s->stream.next_out++;
419 s->stream.avail_out--;
429 while (s->stream.avail_out != 0) {
433 uInt n = s->stream.avail_in;
434 if (n > s->stream.avail_out) n = s->stream.avail_out;
436 zmemcpy(s->stream.next_out, s->stream.next_in, n);
438 s->stream.next_out = next_out;
439 s->stream.next_in += n;
440 s->stream.avail_out -= n;
441 s->stream.avail_in -= n;
443 if (s->stream.avail_out > 0) {
444 s->stream.avail_out -=
445 (uInt)fread(next_out, 1, s->stream.avail_out, s->file);
447 len -= s->stream.avail_out;
453 if (s->stream.avail_in == 0 && !s->z_eof) {
456 s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
457 if (s->stream.avail_in == 0) {
464 s->stream.next_in = s->inbuf;
466 s->in += s->stream.avail_in;
467 s->out += s->stream.avail_out;
468 s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
469 s->in -= s->stream.avail_in;
470 s->out -= s->stream.avail_out;
474 s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
475 start = s->stream.next_out;
487 inflateReset(&(s->stream));
494 s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
496 if (len == s->stream.avail_out &&
499 return (int)(len - s->stream.avail_out);
572 s->stream.next_in = (Bytef*)buf;
573 s->stream.avail_in = len;
575 while (s->stream.avail_in != 0) {
577 if (s->stream.avail_out == 0) {
579 s->stream.next_out = s->outbuf;
584 s->stream.avail_out = Z_BUFSIZE;
586 s->in += s->stream.avail_in;
587 s->out += s->stream.avail_out;
588 s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
589 s->in -= s->stream.avail_in;
590 s->out -= s->stream.avail_out;
595 return (int)(len - s->stream.avail_in);
719 s->stream.avail_in = 0; /* should be zero already anyway */
722 len = Z_BUFSIZE - s->stream.avail_out;
729 s->stream.next_out = s->outbuf;
730 s->stream.avail_out = Z_BUFSIZE;
733 s->out += s->stream.avail_out;
734 s->z_err = deflate(&(s->stream), flush);
735 s->out -= s->stream.avail_out;
743 done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
821 s->stream.avail_in = 0;
822 s->stream.next_in = s->inbuf;
871 s->stream.avail_in = 0;
872 s->stream.next_in = s->inbuf;
874 if (!s->transparent) (void)inflateReset(&s->stream);
1008 m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);