mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-04-18 10:53:49 +01:00
rename window -> s_window, close #60
This commit is contained in:
parent
3d02fb105c
commit
2bef4935c7
1 changed files with 8 additions and 7 deletions
|
@ -52,7 +52,8 @@ module.exports = function inflate_fast(strm, start) {
|
||||||
var wsize; /* window size or zero if not using window */
|
var wsize; /* window size or zero if not using window */
|
||||||
var whave; /* valid bytes in the window */
|
var whave; /* valid bytes in the window */
|
||||||
var wnext; /* window write index */
|
var wnext; /* window write index */
|
||||||
var window; /* allocated sliding window, if wsize != 0 */
|
// Use `s_window` instead `window`, avoid conflict with instrumentation tools
|
||||||
|
var s_window; /* allocated sliding window, if wsize != 0 */
|
||||||
var hold; /* local strm.hold */
|
var hold; /* local strm.hold */
|
||||||
var bits; /* local strm.bits */
|
var bits; /* local strm.bits */
|
||||||
var lcode; /* local strm.lencode */
|
var lcode; /* local strm.lencode */
|
||||||
|
@ -86,7 +87,7 @@ module.exports = function inflate_fast(strm, start) {
|
||||||
wsize = state.wsize;
|
wsize = state.wsize;
|
||||||
whave = state.whave;
|
whave = state.whave;
|
||||||
wnext = state.wnext;
|
wnext = state.wnext;
|
||||||
window = state.window;
|
s_window = state.window;
|
||||||
hold = state.hold;
|
hold = state.hold;
|
||||||
bits = state.bits;
|
bits = state.bits;
|
||||||
lcode = state.lencode;
|
lcode = state.lencode;
|
||||||
|
@ -204,13 +205,13 @@ module.exports = function inflate_fast(strm, start) {
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
from = 0; // window index
|
from = 0; // window index
|
||||||
from_source = window;
|
from_source = s_window;
|
||||||
if (wnext === 0) { /* very common case */
|
if (wnext === 0) { /* very common case */
|
||||||
from += wsize - op;
|
from += wsize - op;
|
||||||
if (op < len) { /* some from window */
|
if (op < len) { /* some from window */
|
||||||
len -= op;
|
len -= op;
|
||||||
do {
|
do {
|
||||||
output[_out++] = window[from++];
|
output[_out++] = s_window[from++];
|
||||||
} while (--op);
|
} while (--op);
|
||||||
from = _out - dist; /* rest from output */
|
from = _out - dist; /* rest from output */
|
||||||
from_source = output;
|
from_source = output;
|
||||||
|
@ -222,14 +223,14 @@ module.exports = function inflate_fast(strm, start) {
|
||||||
if (op < len) { /* some from end of window */
|
if (op < len) { /* some from end of window */
|
||||||
len -= op;
|
len -= op;
|
||||||
do {
|
do {
|
||||||
output[_out++] = window[from++];
|
output[_out++] = s_window[from++];
|
||||||
} while (--op);
|
} while (--op);
|
||||||
from = 0;
|
from = 0;
|
||||||
if (wnext < len) { /* some from start of window */
|
if (wnext < len) { /* some from start of window */
|
||||||
op = wnext;
|
op = wnext;
|
||||||
len -= op;
|
len -= op;
|
||||||
do {
|
do {
|
||||||
output[_out++] = window[from++];
|
output[_out++] = s_window[from++];
|
||||||
} while (--op);
|
} while (--op);
|
||||||
from = _out - dist; /* rest from output */
|
from = _out - dist; /* rest from output */
|
||||||
from_source = output;
|
from_source = output;
|
||||||
|
@ -241,7 +242,7 @@ module.exports = function inflate_fast(strm, start) {
|
||||||
if (op < len) { /* some from window */
|
if (op < len) { /* some from window */
|
||||||
len -= op;
|
len -= op;
|
||||||
do {
|
do {
|
||||||
output[_out++] = window[from++];
|
output[_out++] = s_window[from++];
|
||||||
} while (--op);
|
} while (--op);
|
||||||
from = _out - dist; /* rest from output */
|
from = _out - dist; /* rest from output */
|
||||||
from_source = output;
|
from_source = output;
|
||||||
|
|
Loading…
Add table
Reference in a new issue