| 20628 | } |
| 20629 | |
| 20630 | function inflateResetKeep(strm) { |
| 20631 | var state; |
| 20632 | |
| 20633 | if (!strm || !strm.state) { return Z_STREAM_ERROR; } |
| 20634 | state = strm.state; |
| 20635 | strm.total_in = strm.total_out = state.total = 0; |
| 20636 | strm.msg = ''; /*Z_NULL*/ |
| 20637 | if (state.wrap) { /* to support ill-conceived Java test suite */ |
| 20638 | strm.adler = state.wrap & 1; |
| 20639 | } |
| 20640 | state.mode = HEAD; |
| 20641 | state.last = 0; |
| 20642 | state.havedict = 0; |
| 20643 | state.dmax = 32768; |
| 20644 | state.head = null/*Z_NULL*/; |
| 20645 | state.hold = 0; |
| 20646 | state.bits = 0; |
| 20647 | //state.lencode = state.distcode = state.next = state.codes; |
| 20648 | state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); |
| 20649 | state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); |
| 20650 | |
| 20651 | state.sane = 1; |
| 20652 | state.back = -1; |
| 20653 | //Tracev((stderr, "inflate: reset\n")); |
| 20654 | return Z_OK; |
| 20655 | } |
| 20656 | |
| 20657 | function inflateReset(strm) { |
| 20658 | var state; |