Lines Matching refs:state

17913 	  var state = this._readableState;
17915 if (util.isString(chunk) && !state.objectMode) {
17916 encoding = encoding || state.defaultEncoding;
17917 if (encoding !== state.encoding) {
17923 return readableAddChunk(this, state, chunk, encoding, false);
17928 var state = this._readableState;
17929 return readableAddChunk(this, state, chunk, '', true);
17932 function readableAddChunk(stream, state, chunk, encoding, addToFront) {
17933 var er = chunkInvalid(state, chunk);
17937 state.reading = false;
17938 if (!state.ended)
17939 onEofChunk(stream, state);
17940 } else if (state.objectMode || chunk && chunk.length > 0) {
17941 if (state.ended && !addToFront) {
17944 } else if (state.endEmitted && addToFront) {
17948 if (state.decoder && !addToFront && !encoding)
17949 chunk = state.decoder.write(chunk);
17952 state.reading = false;
17955 if (state.flowing && state.length === 0 && !state.sync) {
17960 state.length += state.objectMode ? 1 : chunk.length;
17962 state.buffer.unshift(chunk);
17964 state.buffer.push(chunk);
17966 if (state.needReadable)
17970 maybeReadMore(stream, state);
17973 state.reading = false;
17976 return needMoreData(state);
17988 function needMoreData(state) {
17989 return !state.ended &&
17990 (state.needReadable ||
17991 state.length < state.highWaterMark ||
17992 state.length === 0);
18018 function howMuchToRead(n, state) {
18019 if (state.length === 0 && state.ended)
18022 if (state.objectMode)
18027 if (state.flowing && state.buffer.length)
18028 return state.buffer[0].length;
18030 return state.length;
18040 if (n > state.highWaterMark)
18041 state.highWaterMark = roundUpToNextPowerOf2(n);
18044 if (n > state.length) {
18045 if (!state.ended) {
18046 state.needReadable = true;
18049 return state.length;
18058 var state = this._readableState;
18062 state.emittedReadable = false;
18068 state.needReadable &&
18069 (state.length >= state.highWaterMark || state.ended)) {
18070 debug('read: emitReadable', state.length, state.ended);
18071 if (state.length === 0 && state.ended)
18078 n = howMuchToRead(n, state);
18081 if (n === 0 && state.ended) {
18082 if (state.length === 0)
18110 var doRead = state.needReadable;
18114 if (state.length === 0 || state.length - n < state.highWaterMark) {
18121 if (state.ended || state.reading) {
18128 state.reading = true;
18129 state.sync = true;
18131 if (state.length === 0)
18132 state.needReadable = true;
18134 this._read(state.highWaterMark);
18135 state.sync = false;
18140 if (doRead && !state.reading)
18141 n = howMuchToRead(nOrig, state);
18145 ret = fromList(n, state);
18150 state.needReadable = true;
18154 state.length -= n;
18158 if (state.length === 0 && !state.ended)
18159 state.needReadable = true;
18162 if (nOrig !== n && state.ended && state.length === 0)
18171 function chunkInvalid(state, chunk) {
18176 !state.objectMode) {
18183 function onEofChunk(stream, state) {
18184 if (state.decoder && !state.ended) {
18185 var chunk = state.decoder.end();
18187 state.buffer.push(chunk);
18188 state.length += state.objectMode ? 1 : chunk.length;
18191 state.ended = true;
18201 var state = stream._readableState;
18202 state.needReadable = false;
18203 if (!state.emittedReadable) {
18204 debug('emitReadable', state.flowing);
18205 state.emittedReadable = true;
18206 if (state.sync)
18228 function maybeReadMore(stream, state) {
18229 if (!state.readingMore) {
18230 state.readingMore = true;
18232 maybeReadMore_(stream, state);
18237 function maybeReadMore_(stream, state) {
18238 var len = state.length;
18239 while (!state.reading && !state.flowing && !state.ended &&
18240 state.length < state.highWaterMark) {
18243 if (len === state.length)
18247 len = state.length;
18249 state.readingMore = false;
18262 var state = this._readableState;
18264 switch (state.pipesCount) {
18266 state.pipes = dest;
18269 state.pipes = [state.pipes, dest];
18272 state.pipes.push(dest);
18275 state.pipesCount += 1;
18276 debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
18283 if (state.endEmitted)
18325 if (state.awaitDrain &&
18384 if (!state.flowing) {
18394 var state = src._readableState;
18395 debug('pipeOnDrain', state.awaitDrain);
18396 if (state.awaitDrain)
18397 state.awaitDrain--;
18398 if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
18399 state.flowing = true;
18407 var state = this._readableState;
18410 if (state.pipesCount === 0)
18414 if (state.pipesCount === 1) {
18416 if (dest && dest !== state.pipes)
18420 dest = state.pipes;
18423 state.pipes = null;
18424 state.pipesCount = 0;
18425 state.flowing = false;
18435 var dests = state.pipes;
18436 var len = state.pipesCount;
18437 state.pipes = null;
18438 state.pipesCount = 0;
18439 state.flowing = false;
18447 var i = indexOf(state.pipes, dest);
18451 state.pipes.splice(i, 1);
18452 state.pipesCount -= 1;
18453 if (state.pipesCount === 1)
18454 state.pipes = state.pipes[0];
18473 var state = this._readableState;
18474 if (!state.readableListening) {
18475 state.readableListening = true;
18476 state.emittedReadable = false;
18477 state.needReadable = true;
18478 if (!state.reading) {
18484 } else if (state.length) {
18485 emitReadable(this, state);
18497 var state = this._readableState;
18498 if (!state.flowing) {
18500 state.flowing = true;
18501 if (!state.reading) {
18505 resume(this, state);
18510 function resume(stream, state) {
18511 if (!state.resumeScheduled) {
18512 state.resumeScheduled = true;
18514 resume_(stream, state);
18519 function resume_(stream, state) {
18520 state.resumeScheduled = false;
18523 if (state.flowing && !state.reading)
18538 var state = stream._readableState;
18539 debug('flow', state.flowing);
18540 if (state.flowing) {
18543 } while (null !== chunk && state.flowing);
18551 var state = this._readableState;
18557 if (state.decoder && !state.ended) {
18558 var chunk = state.decoder.end();
18568 if (state.decoder)
18569 chunk = state.decoder.write(chunk);
18570 if (!chunk || !state.objectMode && !chunk.length)
18616 function fromList(n, state) {
18617 var list = state.buffer;
18618 var length = state.length;
18619 var stringMode = !!state.decoder;
18620 var objectMode = !!state.objectMode;
18681 var state = stream._readableState;
18685 if (state.length > 0)
18688 if (!state.endEmitted) {
18689 state.ended = true;
18692 if (!state.endEmitted && state.length === 0) {
18693 state.endEmitted = true;
19228 function writeAfterEnd(stream, state, cb) {
19242 function validChunk(stream, state, chunk, cb) {
19247 !state.objectMode) {
19259 var state = this._writableState;
19270 encoding = state.defaultEncoding;
19275 if (state.ended)
19276 writeAfterEnd(this, state, cb);
19277 else if (validChunk(this, state, chunk, cb)) {
19278 state.pendingcb++;
19279 ret = writeOrBuffer(this, state, chunk, encoding, cb);
19286 var state = this._writableState;
19288 state.corked++;
19292 var state = this._writableState;
19294 if (state.corked) {
19295 state.corked--;
19297 if (!state.writing &&
19298 !state.corked &&
19299 !state.finished &&
19300 !state.bufferProcessing &&
19301 state.buffer.length)
19302 clearBuffer(this, state);
19306 function decodeChunk(state, chunk, encoding) {
19307 if (!state.objectMode &&
19308 state.decodeStrings !== false &&
19318 function writeOrBuffer(stream, state, chunk, encoding, cb) {
19319 chunk = decodeChunk(state, chunk, encoding);
19322 var len = state.objectMode ? 1 : chunk.length;
19324 state.length += len;
19326 var ret = state.length < state.highWaterMark;
19329 state.needDrain = true;
19331 if (state.writing || state.corked)
19332 state.buffer.push(new WriteReq(chunk, encoding, cb));
19334 doWrite(stream, state, false, len, chunk, encoding, cb);
19339 function doWrite(stream, state, writev, len, chunk, encoding, cb) {
19340 state.writelen = len;
19341 state.writecb = cb;
19342 state.writing = true;
19343 state.sync = true;
19345 stream._writev(chunk, state.onwrite);
19347 stream._write(chunk, encoding, state.onwrite);
19348 state.sync = false;
19351 function onwriteError(stream, state, sync, er, cb) {
19354 state.pendingcb--;
19358 state.pendingcb--;
19366 function onwriteStateUpdate(state) {
19367 state.writing = false;
19368 state.writecb = null;
19369 state.length -= state.writelen;
19370 state.writelen = 0;
19374 var state = stream._writableState;
19375 var sync = state.sync;
19376 var cb = state.writecb;
19378 onwriteStateUpdate(state);
19381 onwriteError(stream, state, sync, er, cb);
19384 var finished = needFinish(stream, state);
19387 !state.corked &&
19388 !state.bufferProcessing &&
19389 state.buffer.length) {
19390 clearBuffer(stream, state);
19395 afterWrite(stream, state, finished, cb);
19398 afterWrite(stream, state, finished, cb);
19403 function afterWrite(stream, state, finished, cb) {
19405 onwriteDrain(stream, state);
19406 state.pendingcb--;
19408 finishMaybe(stream, state);
19414 function onwriteDrain(stream, state) {
19415 if (state.length === 0 && state.needDrain) {
19416 state.needDrain = false;
19423 function clearBuffer(stream, state) {
19424 state.bufferProcessing = true;
19426 if (stream._writev && state.buffer.length > 1) {
19429 for (var c = 0; c < state.buffer.length; c++)
19430 cbs.push(state.buffer[c].callback);
19434 state.pendingcb++;
19435 doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
19437 state.pendingcb--;
19443 state.buffer = [];
19446 for (var c = 0; c < state.buffer.length; c++) {
19447 var entry = state.buffer[c];
19451 var len = state.objectMode ? 1 : chunk.length;
19453 doWrite(stream, state, false, len, chunk, encoding, cb);
19459 if (state.writing) {
19465 if (c < state.buffer.length)
19466 state.buffer = state.buffer.slice(c);
19468 state.buffer.length = 0;
19471 state.bufferProcessing = false;
19482 var state = this._writableState;
19497 if (state.corked) {
19498 state.corked = 1;
19503 if (!state.ending && !state.finished)
19504 endWritable(this, state, cb);
19508 function needFinish(stream, state) {
19509 return (state.ending &&
19510 state.length === 0 &&
19511 !state.finished &&
19512 !state.writing);
19515 function prefinish(stream, state) {
19516 if (!state.prefinished) {
19517 state.prefinished = true;
19522 function finishMaybe(stream, state) {
19523 var need = needFinish(stream, state);
19525 if (state.pendingcb === 0) {
19526 prefinish(stream, state);
19527 state.finished = true;
19530 prefinish(stream, state);
19535 function endWritable(stream, state, cb) {
19536 state.ending = true;
19537 finishMaybe(stream, state);
19539 if (state.finished)
19544 state.ended = true;
21244 this.state = null;
21382 var s = strm.state;
21444 if (strm.state.wrap === 1) {
21448 else if (strm.state.wrap === 2) {
22521 if (!strm || !strm.state) {
22528 s = strm.state;
22550 lm_init(strm.state);
22557 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
22558 if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }
22559 strm.state.gzhead = head;
22599 strm.state = s;
22644 if (!strm || !strm.state ||
22649 s = strm.state;
22977 if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
22981 status = strm.state.status;
22993 strm.state = null;
24588 var state;
24590 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
24591 state = strm.state;
24592 strm.total_in = strm.total_out = state.total = 0;
24594 if (state.wrap) { /* to support ill-conceived Java test suite */
24595 strm.adler = state.wrap & 1;
24597 state.mode = HEAD;
24598 state.last = 0;
24599 state.havedict = 0;
24600 state.dmax = 32768;
24601 state.head = null/*Z_NULL*/;
24602 state.hold = 0;
24603 state.bits = 0;
24605 state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);
24606 state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);
24608 state.sane = 1;
24609 state.back = -1;
24615 var state;
24617 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
24618 state = strm.state;
24619 state.wsize = 0;
24620 state.whave = 0;
24621 state.wnext = 0;
24628 var state;
24631 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
24632 state = strm.state;
24650 if (state.window !== null && state.wbits !== windowBits) {
24651 state.window = null;
24655 state.wrap = wrap;
24656 state.wbits = windowBits;
24662 var state;
24667 state = new InflateState();
24671 strm.state = state;
24672 state.window = null/*Z_NULL*/;
24675 strm.state = null/*Z_NULL*/;
24699 function fixedtables(state) {
24709 while (sym < 144) { state.lens[sym++] = 8; }
24710 while (sym < 256) { state.lens[sym++] = 9; }
24711 while (sym < 280) { state.lens[sym++] = 7; }
24712 while (sym < 288) { state.lens[sym++] = 8; }
24714 inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {bits: 9});
24718 while (sym < 32) { state.lens[sym++] = 5; }
24720 inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {bits: 5});
24726 state.lencode = lenfix;
24727 state.lenbits = 9;
24728 state.distcode = distfix;
24729 state.distbits = 5;
24749 var state = strm.state;
24752 if (state.window === null) {
24753 state.wsize = 1 << state.wbits;
24754 state.wnext = 0;
24755 state.whave = 0;
24757 state.window = new utils.Buf8(state.wsize);
24761 if (copy >= state.wsize) {
24762 utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0);
24763 state.wnext = 0;
24764 state.whave = state.wsize;
24767 dist = state.wsize - state.wnext;
24772 utils.arraySet(state.window,src, end - copy, dist, state.wnext);
24776 utils.arraySet(state.window,src, end - copy, copy, 0);
24777 state.wnext = copy;
24778 state.whave = state.wsize;
24781 state.wnext += dist;
24782 if (state.wnext === state.wsize) { state.wnext = 0; }
24783 if (state.whave < state.wsize) { state.whave += dist; }
24790 var state;
24816 if (!strm || !strm.state || !strm.output ||
24821 state = strm.state;
24822 if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */
24832 hold = state.hold;
24833 bits = state.bits;
24842 switch (state.mode) {
24844 if (state.wrap === 0) {
24845 state.mode = TYPEDO;
24856 if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */
24857 state.check = 0/*crc32(0L, Z_NULL, 0)*/;
24861 state.check = crc32(state.check, hbuf, 2, 0);
24868 state.mode = FLAGS;
24871 state.flags = 0; /* expect zlib header */
24872 if (state.head) {
24873 state.head.done = false;
24875 if (!(state.wrap & 1) || /* check if zlib header allowed */
24878 state.mode = BAD;
24883 state.mode = BAD;
24891 if (state.wbits === 0) {
24892 state.wbits = len;
24894 else if (len > state.wbits) {
24896 state.mode = BAD;
24899 state.dmax = 1 << len;
24901 strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
24902 state.mode = hold & 0x200 ? DICTID : TYPE;
24917 state.flags = hold;
24918 if ((state.flags & 0xff) !== Z_DEFLATED) {
24920 state.mode = BAD;
24923 if (state.flags & 0xe000) {
24925 state.mode = BAD;
24928 if (state.head) {
24929 state.head.text = ((hold >> 8) & 1);
24931 if (state.flags & 0x0200) {
24935 state.check = crc32(state.check, hbuf, 2, 0);
24942 state.mode = TIME;
24953 if (state.head) {
24954 state.head.time = hold;
24956 if (state.flags & 0x0200) {
24962 state.check = crc32(state.check, hbuf, 4, 0);
24969 state.mode = OS;
24980 if (state.head) {
24981 state.head.xflags = (hold & 0xff);
24982 state.head.os = (hold >> 8);
24984 if (state.flags & 0x0200) {
24988 state.check = crc32(state.check, hbuf, 2, 0);
24995 state.mode = EXLEN;
24998 if (state.flags & 0x0400) {
25007 state.length = hold;
25008 if (state.head) {
25009 state.head.extra_len = hold;
25011 if (state.flags & 0x0200) {
25015 state.check = crc32(state.check, hbuf, 2, 0);
25023 else if (state.head) {
25024 state.head.extra = null/*Z_NULL*/;
25026 state.mode = EXTRA;
25029 if (state.flags & 0x0400) {
25030 copy = state.length;
25033 if (state.head) {
25034 len = state.head.extra_len - state.length;
25035 if (!state.head.extra) {
25037 state.head.extra = new Array(state.head.extra_len);
25040 state.head.extra,
25053 if (state.flags & 0x0200) {
25054 state.check = crc32(state.check, input, copy, next);
25058 state.length -= copy;
25060 if (state.length) { break inf_leave; }
25062 state.length = 0;
25063 state.mode = NAME;
25066 if (state.flags & 0x0800) {
25073 if (state.head && len &&
25074 (state.length < 65536 /*state.head.name_max*/)) {
25075 state.head.name += String.fromCharCode(len);
25079 if (state.flags & 0x0200) {
25080 state.check = crc32(state.check, input, copy, next);
25086 else if (state.head) {
25087 state.head.name = null;
25089 state.length = 0;
25090 state.mode = COMMENT;
25093 if (state.flags & 0x1000) {
25099 if (state.head && len &&
25100 (state.length < 65536 /*state.head.comm_max*/)) {
25101 state.head.comment += String.fromCharCode(len);
25104 if (state.flags & 0x0200) {
25105 state.check = crc32(state.check, input, copy, next);
25111 else if (state.head) {
25112 state.head.comment = null;
25114 state.mode = HCRC;
25117 if (state.flags & 0x0200) {
25126 if (hold !== (state.check & 0xffff)) {
25128 state.mode = BAD;
25136 if (state.head) {
25137 state.head.hcrc = ((state.flags >> 9) & 1);
25138 state.head.done = true;
25140 strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/;
25141 state.mode = TYPE;
25152 strm.adler = state.check = ZSWAP32(hold);
25157 state.mode = DICT;
25160 if (state.havedict === 0) {
25166 state.hold = hold;
25167 state.bits = bits;
25171 strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
25172 state.mode = TYPE;
25178 if (state.last) {
25183 state.mode = CHECK;
25194 state.last = (hold & 0x01)/*BITS(1)*/;
25204 state.mode = STORED;
25207 fixedtables(state);
25210 state.mode = LEN_; /* decode codes */
25222 state.mode = TABLE;
25226 state.mode = BAD;
25248 state.mode = BAD;
25251 state.length = hold & 0xffff;
25258 state.mode = COPY_;
25262 state.mode = COPY;
25265 copy = state.length;
25277 state.length -= copy;
25281 state.mode = TYPE;
25292 state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
25297 state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
25302 state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
25308 if (state.nlen > 286 || state.ndist > 30) {
25310 state.mode = BAD;
25315 state.have = 0;
25316 state.mode = LENLENS;
25319 while (state.have < state.ncode) {
25328 state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
25334 while (state.have < 19) {
25335 state.lens[order[state.have++]] = 0;
25341 state.lencode = state.lendyn;
25342 state.lenbits = 7;
25344 opts = {bits: state.lenbits};
25345 ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
25346 state.lenbits = opts.bits;
25350 state.mode = BAD;
25354 state.have = 0;
25355 state.mode = CODELENS;
25358 while (state.have < state.nlen + state.ndist) {
25360 here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
25378 state.lens[state.have++] = here_val;
25395 if (state.have === 0) {
25397 state.mode = BAD;
25400 len = state.lens[state.have - 1];
25449 if (state.have + copy > state.nlen + state.ndist) {
25451 state.mode = BAD;
25455 state.lens[state.have++] = len;
25461 if (state.mode === BAD) { break; }
25464 if (state.lens[256] === 0) {
25466 state.mode = BAD;
25473 state.lenbits = 9;
25475 opts = {bits: state.lenbits};
25476 ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
25479 state.lenbits = opts.bits;
25484 state.mode = BAD;
25488 state.distbits = 6;
25491 state.distcode = state.distdyn;
25492 opts = {bits: state.distbits};
25493 …ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opt…
25496 state.distbits = opts.bits;
25501 state.mode = BAD;
25505 state.mode = LEN_;
25509 state.mode = LEN;
25518 state.hold = hold;
25519 state.bits = bits;
25529 hold = state.hold;
25530 bits = state.bits;
25533 if (state.mode === TYPE) {
25534 state.back = -1;
25538 state.back = 0;
25540 here = state.lencode[hold & ((1 << state.lenbits) -1)]; /*BITS(state.lenbits)*/
25558 here = state.lencode[last_val +
25576 state.back += last_bits;
25582 state.back += here_bits;
25583 state.length = here_val;
25588 state.mode = LIT;
25593 state.back = -1;
25594 state.mode = TYPE;
25599 state.mode = BAD;
25602 state.extra = here_op & 15;
25603 state.mode = LENEXT;
25606 if (state.extra) {
25608 n = state.extra;
25616 state.length += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;
25618 hold >>>= state.extra;
25619 bits -= state.extra;
25621 state.back += state.extra;
25624 state.was = state.length;
25625 state.mode = DIST;
25629 here = state.distcode[hold & ((1 << state.distbits) -1)];/*BITS(state.distbits)*/
25647 here = state.distcode[last_val +
25665 state.back += last_bits;
25671 state.back += here_bits;
25674 state.mode = BAD;
25677 state.offset = here_val;
25678 state.extra = (here_op) & 15;
25679 state.mode = DISTEXT;
25682 if (state.extra) {
25684 n = state.extra;
25692 state.offset += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;
25694 hold >>>= state.extra;
25695 bits -= state.extra;
25697 state.back += state.extra;
25700 if (state.offset > state.dmax) {
25702 state.mode = BAD;
25707 state.mode = MATCH;
25712 if (state.offset > copy) { /* copy from window */
25713 copy = state.offset - copy;
25714 if (copy > state.whave) {
25715 if (state.sane) {
25717 state.mode = BAD;
25736 if (copy > state.wnext) {
25737 copy -= state.wnext;
25738 from = state.wsize - copy;
25741 from = state.wnext - copy;
25743 if (copy > state.length) { copy = state.length; }
25744 from_source = state.window;
25748 from = put - state.offset;
25749 copy = state.length;
25753 state.length -= copy;
25757 if (state.length === 0) { state.mode = LEN; }
25761 output[put++] = state.length;
25763 state.mode = LEN;
25766 if (state.wrap) {
25778 state.total += _out;
25780 strm.adler = state.check =
25782 …(state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, p…
25787 if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) {
25789 state.mode = BAD;
25798 state.mode = LENGTH;
25801 if (state.wrap && state.flags) {
25810 if (hold !== (state.total & 0xffffffff)) {
25812 state.mode = BAD;
25821 state.mode = DONE;
25852 state.hold = hold;
25853 state.bits = bits;
25856 if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
25857 (state.mode < CHECK || flush !== Z_FINISH))) {
25859 state.mode = MEM;
25867 state.total += _out;
25868 if (state.wrap && _out) {
25869 strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
25870 …(state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, outpu…
25872 strm.data_type = state.bits + (state.last ? 64 : 0) +
25873 (state.mode === TYPE ? 128 : 0) +
25874 (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
25883 if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
25887 var state = strm.state;
25888 if (state.window) {
25889 state.window = null;
25891 strm.state = null;
25896 var state;
25899 if (!strm || !strm.state) { return Z_STREAM_ERROR; }
25900 state = strm.state;
25901 if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }
25904 state.head = head;
25978 var state;
26009 state = strm.state;
26019 dmax = state.dmax;
26021 wsize = state.wsize;
26022 whave = state.whave;
26023 wnext = state.wnext;
26024 window = state.window;
26025 hold = state.hold;
26026 bits = state.bits;
26027 lcode = state.lencode;
26028 dcode = state.distcode;
26029 lmask = (1 << state.lenbits) - 1;
26030 dmask = (1 << state.distbits) - 1;
26102 state.mode = BAD;
26113 if (state.sane) {
26115 state.mode = BAD;
26220 state.mode = BAD;
26233 state.mode = TYPE;
26238 state.mode = BAD;
26257 state.hold = hold;
26258 state.bits = bits;