Lines Matching refs:strm
4746 this.strm = new ZStream();
4747 this.strm.avail_out = 0;
4750 this.strm,
4763 zlib_deflate.deflateSetHeader(this.strm, opt.header);
4778 status = zlib_deflate.deflateSetDictionary(this.strm, dict);
4818 var strm = this.strm;
4829 strm.input = strings.string2buf(data);
4831 strm.input = new Uint8Array(data);
4833 strm.input = data;
4836 strm.next_in = 0;
4837 strm.avail_in = strm.input.length;
4840 if (strm.avail_out === 0) {
4841 strm.output = new utils.Buf8(chunkSize);
4842 strm.next_out = 0;
4843 strm.avail_out = chunkSize;
4845 status = zlib_deflate.deflate(strm, _mode); /* no bad return value */
4852 …if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH)…
4854 this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));
4856 this.onData(utils.shrinkBuf(strm.output, strm.next_out));
4859 } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);
4863 status = zlib_deflate.deflateEnd(this.strm);
4872 strm.avail_out = 0;
4915 this.msg = this.strm.msg;
5132 this.strm = new ZStream();
5133 this.strm.avail_out = 0;
5136 this.strm,
5146 zlib_inflate.inflateGetHeader(this.strm, this.header);
5178 var strm = this.strm;
5195 strm.input = strings.binstring2buf(data);
5197 strm.input = new Uint8Array(data);
5199 strm.input = data;
5202 strm.next_in = 0;
5203 strm.avail_in = strm.input.length;
5206 if (strm.avail_out === 0) {
5207 strm.output = new utils.Buf8(chunkSize);
5208 strm.next_out = 0;
5209 strm.avail_out = chunkSize;
5212 status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */
5224 status = zlib_inflate.inflateSetDictionary(this.strm, dict);
5239 if (strm.next_out) {
5240 …if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FI…
5244 next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
5246 tail = strm.next_out - next_out_utf8;
5247 utf8str = strings.buf2string(strm.output, next_out_utf8);
5250 strm.next_out = tail;
5251 strm.avail_out = chunkSize - tail;
5252 if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }
5257 this.onData(utils.shrinkBuf(strm.output, strm.next_out));
5269 if (strm.avail_in === 0 && strm.avail_out === 0) {
5273 } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);
5281 status = zlib_inflate.inflateEnd(this.strm);
5290 strm.avail_out = 0;
5335 this.msg = this.strm.msg;
6020 function err(strm, errorCode) { argument
6021 strm.msg = msg[errorCode];
6038 function flush_pending(strm) { argument
6039 var s = strm.state;
6043 if (len > strm.avail_out) {
6044 len = strm.avail_out;
6048 utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);
6049 strm.next_out += len;
6051 strm.total_out += len;
6052 strm.avail_out -= len;
6063 flush_pending(s.strm);
6092 function read_buf(strm, buf, start, size) { argument
6093 var len = strm.avail_in;
6098 strm.avail_in -= len;
6101 utils.arraySet(buf, strm.input, strm.next_in, len, start);
6102 if (strm.state.wrap === 1) {
6103 strm.adler = adler32(strm.adler, buf, len, start);
6106 else if (strm.state.wrap === 2) {
6107 strm.adler = crc32(strm.adler, buf, len, start);
6110 strm.next_in += len;
6111 strm.total_in += len;
6300 if (s.strm.avail_in === 0) {
6316 n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
6346 } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);
6442 if (s.strm.avail_out === 0) {
6455 if (s.strm.avail_out === 0) {
6467 if (s.strm.avail_out === 0) {
6477 if (s.strm.avail_out === 0) {
6589 if (s.strm.avail_out === 0) {
6599 if (s.strm.avail_out === 0) {
6608 if (s.strm.avail_out === 0) {
6713 if (s.strm.avail_out === 0) {
6735 if (s.strm.avail_out === 0) {
6759 if (s.strm.avail_out === 0) {
6768 if (s.strm.avail_out === 0) {
6847 if (s.strm.avail_out === 0) {
6857 if (s.strm.avail_out === 0) {
6866 if (s.strm.avail_out === 0) {
6903 if (s.strm.avail_out === 0) {
6913 if (s.strm.avail_out === 0) {
6922 if (s.strm.avail_out === 0) {
6988 this.strm = null; /* pointer back to this zlib stream */
7176 function deflateResetKeep(strm) { argument
7179 if (!strm || !strm.state) {
7180 return err(strm, Z_STREAM_ERROR);
7183 strm.total_in = strm.total_out = 0;
7184 strm.data_type = Z_UNKNOWN;
7186 s = strm.state;
7195 strm.adler = (s.wrap === 2) ?
7205 function deflateReset(strm) { argument
7206 var ret = deflateResetKeep(strm);
7208 lm_init(strm.state);
7214 function deflateSetHeader(strm, head) { argument
7215 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
7216 if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }
7217 strm.state.gzhead = head;
7222 function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { argument
7223 if (!strm) { // === Z_NULL
7246 return err(strm, Z_STREAM_ERROR);
7257 strm.state = s;
7258 s.strm = strm;
7297 return deflateReset(strm);
7300 function deflateInit(strm, level) { argument
7301 return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
7305 function deflate(strm, flush) { argument
7309 if (!strm || !strm.state ||
7311 return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;
7314 s = strm.state;
7316 if (!strm.output ||
7317 (!strm.input && strm.avail_in !== 0) ||
7319 return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);
7322 s.strm = strm; /* just in case */
7330 strm.adler = 0; //crc32(0L, Z_NULL, 0);
7366 strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);
7395 putShortMSB(s, strm.adler >>> 16);
7396 putShortMSB(s, strm.adler & 0xffff);
7398 strm.adler = 1; // adler32(0L, Z_NULL, 0);
7410 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
7412 flush_pending(strm);
7422 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
7441 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
7443 flush_pending(strm);
7460 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
7479 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
7481 flush_pending(strm);
7498 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
7511 flush_pending(strm);
7514 put_byte(s, strm.adler & 0xff);
7515 put_byte(s, (strm.adler >> 8) & 0xff);
7516 strm.adler = 0; //crc32(0L, Z_NULL, 0);
7528 flush_pending(strm);
7529 if (strm.avail_out === 0) {
7544 } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
7546 return err(strm, Z_BUF_ERROR);
7550 if (s.status === FINISH_STATE && strm.avail_in !== 0) {
7551 return err(strm, Z_BUF_ERROR);
7556 if (strm.avail_in !== 0 || s.lookahead !== 0 ||
7566 if (strm.avail_out === 0) {
7600 flush_pending(strm);
7601 if (strm.avail_out === 0) {
7615 put_byte(s, strm.adler & 0xff);
7616 put_byte(s, (strm.adler >> 8) & 0xff);
7617 put_byte(s, (strm.adler >> 16) & 0xff);
7618 put_byte(s, (strm.adler >> 24) & 0xff);
7619 put_byte(s, strm.total_in & 0xff);
7620 put_byte(s, (strm.total_in >> 8) & 0xff);
7621 put_byte(s, (strm.total_in >> 16) & 0xff);
7622 put_byte(s, (strm.total_in >> 24) & 0xff);
7626 putShortMSB(s, strm.adler >>> 16);
7627 putShortMSB(s, strm.adler & 0xffff);
7630 flush_pending(strm);
7639 function deflateEnd(strm) { argument
7642 if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
7646 status = strm.state.status;
7655 return err(strm, Z_STREAM_ERROR);
7658 strm.state = null;
7660 return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;
7668 function deflateSetDictionary(strm, dictionary) { argument
7679 if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
7683 s = strm.state;
7693 strm.adler = adler32(strm.adler, dictionary, dictLength, 0);
7715 avail = strm.avail_in;
7716 next = strm.next_in;
7717 input = strm.input;
7718 strm.avail_in = dictLength;
7719 strm.next_in = 0;
7720 strm.input = dictionary;
7744 strm.next_in = next;
7745 strm.input = input;
7746 strm.avail_in = avail;
7892 module.exports = function inflate_fast(strm, start) { argument
7925 state = strm.state;
7927 _in = strm.next_in;
7928 input = strm.input;
7929 last = _in + (strm.avail_in - 5);
7930 _out = strm.next_out;
7931 output = strm.output;
7932 beg = _out - (start - strm.avail_out);
7933 end = _out + (strm.avail_out - 257);
8017 strm.msg = 'invalid distance too far back';
8030 strm.msg = 'invalid distance too far back';
8135 strm.msg = 'invalid distance code';
8153 strm.msg = 'invalid literal/length code';
8169 strm.next_in = _in;
8170 strm.next_out = _out;
8171 strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
8172 strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
8357 function inflateResetKeep(strm) { argument
8360 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
8361 state = strm.state;
8362 strm.total_in = strm.total_out = state.total = 0;
8363 strm.msg = ''; /*Z_NULL*/
8365 strm.adler = state.wrap & 1;
8384 function inflateReset(strm) { argument
8387 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
8388 state = strm.state;
8392 return inflateResetKeep(strm);
8396 function inflateReset2(strm, windowBits) { argument
8401 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
8402 state = strm.state;
8427 return inflateReset(strm);
8430 function inflateInit2(strm, windowBits) { argument
8434 if (!strm) { return Z_STREAM_ERROR; }
8441 strm.state = state;
8443 ret = inflateReset2(strm, windowBits);
8445 strm.state = null/*Z_NULL*/;
8450 function inflateInit(strm) { argument
8451 return inflateInit2(strm, DEF_WBITS);
8517 function updatewindow(strm, src, end, copy) { argument
8519 var state = strm.state;
8559 function inflate(strm, flush) { argument
8586 if (!strm || !strm.state || !strm.output ||
8587 (!strm.input && strm.avail_in !== 0)) {
8591 state = strm.state;
8596 put = strm.next_out;
8597 output = strm.output;
8598 left = strm.avail_out;
8599 next = strm.next_in;
8600 input = strm.input;
8601 have = strm.avail_in;
8647 strm.msg = 'incorrect header check';
8652 strm.msg = 'unknown compression method';
8665 strm.msg = 'invalid window size';
8671 strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
8689 strm.msg = 'unknown compression method';
8694 strm.msg = 'unknown header flags set';
8897 strm.msg = 'header crc mismatch';
8910 strm.adler = state.check = 0;
8922 strm.adler = state.check = zswap32(hold);
8932 strm.next_out = put;
8933 strm.avail_out = left;
8934 strm.next_in = next;
8935 strm.avail_in = have;
8941 strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
8995 strm.msg = 'invalid block type';
9017 strm.msg = 'invalid stored block lengths';
9079 strm.msg = 'too many length or distance symbols';
9119 strm.msg = 'invalid code lengths set';
9166 strm.msg = 'invalid bit length repeat';
9220 strm.msg = 'invalid bit length repeat';
9235 strm.msg = 'invalid code -- missing end-of-block';
9253 strm.msg = 'invalid literal/lengths set';
9270 strm.msg = 'invalid distances set';
9284 strm.next_out = put;
9285 strm.avail_out = left;
9286 strm.next_in = next;
9287 strm.avail_in = have;
9291 inflate_fast(strm, _out);
9293 put = strm.next_out;
9294 output = strm.output;
9295 left = strm.avail_out;
9296 next = strm.next_in;
9297 input = strm.input;
9298 have = strm.avail_in;
9368 strm.msg = 'invalid literal/length code';
9443 strm.msg = 'invalid distance code';
9471 strm.msg = 'invalid distance too far back';
9486 strm.msg = 'invalid distance too far back';
9547 strm.total_out += _out;
9550 strm.adler = state.check =
9558 strm.msg = 'incorrect data check';
9581 strm.msg = 'incorrect length check';
9618 strm.next_out = put;
9619 strm.avail_out = left;
9620 strm.next_in = next;
9621 strm.avail_in = have;
9626 if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
9628 if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
9633 _in -= strm.avail_in;
9634 _out -= strm.avail_out;
9635 strm.total_in += _in;
9636 strm.total_out += _out;
9639 strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
9640 …ate.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, …
9642 strm.data_type = state.bits + (state.last ? 64 : 0) +
9651 function inflateEnd(strm) { argument
9653 if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
9657 var state = strm.state;
9661 strm.state = null;
9665 function inflateGetHeader(strm, head) { argument
9669 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
9670 state = strm.state;
9679 function inflateSetDictionary(strm, dictionary) { argument
9687 if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }
9688 state = strm.state;
9705 ret = updatewindow(strm, dictionary, dictLength, dictLength);
11199 if (s.strm.data_type === Z_UNKNOWN) {
11200 s.strm.data_type = detect_data_type(s);