(strm, windowBits)
| 20667 | } |
| 20668 | |
| 20669 | function inflateReset2(strm, windowBits) { |
| 20670 | var wrap; |
| 20671 | var state; |
| 20672 | |
| 20673 | /* get the state */ |
| 20674 | if (!strm || !strm.state) { return Z_STREAM_ERROR; } |
| 20675 | state = strm.state; |
| 20676 | |
| 20677 | /* extract wrap request from windowBits parameter */ |
| 20678 | if (windowBits < 0) { |
| 20679 | wrap = 0; |
| 20680 | windowBits = -windowBits; |
| 20681 | } |
| 20682 | else { |
| 20683 | wrap = (windowBits >> 4) + 1; |
| 20684 | if (windowBits < 48) { |
| 20685 | windowBits &= 15; |
| 20686 | } |
| 20687 | } |
| 20688 | |
| 20689 | /* set number of window bits, free window if different */ |
| 20690 | if (windowBits && (windowBits < 8 || windowBits > 15)) { |
| 20691 | return Z_STREAM_ERROR; |
| 20692 | } |
| 20693 | if (state.window !== null && state.wbits !== windowBits) { |
| 20694 | state.window = null; |
| 20695 | } |
| 20696 | |
| 20697 | /* update state and reset the rest of it */ |
| 20698 | state.wrap = wrap; |
| 20699 | state.wbits = windowBits; |
| 20700 | return inflateReset(strm); |
| 20701 | } |
| 20702 | |
| 20703 | function inflateInit2(strm, windowBits) { |
| 20704 | var ret; |
no test coverage detected