@novnc/novnc 1.3.0 → 1.4.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +2 -2
- package/LICENSE.txt +1 -1
- package/README.md +23 -7
- package/core/decoders/jpeg.js +141 -0
- package/core/decoders/raw.js +1 -1
- package/core/decoders/zrle.js +185 -0
- package/core/des.js +1 -1
- package/core/display.js +12 -0
- package/core/encodings.js +4 -0
- package/core/input/keyboard.js +10 -0
- package/core/ra2.js +567 -0
- package/core/rfb.js +469 -84
- package/core/util/browser.js +56 -7
- package/core/util/cursor.js +4 -0
- package/core/util/md5.js +79 -0
- package/docs/API.md +318 -157
- package/lib/base64.js +20 -34
- package/lib/decoders/copyrect.js +5 -12
- package/lib/decoders/hextile.js +17 -47
- package/lib/decoders/jpeg.js +149 -0
- package/lib/decoders/raw.js +10 -23
- package/lib/decoders/rre.js +5 -16
- package/lib/decoders/tight.js +13 -79
- package/lib/decoders/tightpng.js +8 -28
- package/lib/decoders/zrle.js +188 -0
- package/lib/deflator.js +9 -23
- package/lib/des.js +24 -37
- package/lib/display.js +62 -108
- package/lib/encodings.js +7 -8
- package/lib/inflator.js +6 -19
- package/lib/input/domkeytable.js +77 -48
- package/lib/input/fixedkeys.js +8 -3
- package/lib/input/gesturehandler.js +86 -153
- package/lib/input/keyboard.js +62 -91
- package/lib/input/keysym.js +14 -270
- package/lib/input/keysymdef.js +5 -7
- package/lib/input/util.js +43 -85
- package/lib/input/vkeys.js +0 -3
- package/lib/input/xtscancodes.js +1 -168
- package/lib/ra2.js +1005 -0
- package/lib/rfb.js +795 -923
- package/lib/util/browser.js +66 -29
- package/lib/util/cursor.js +29 -66
- package/lib/util/element.js +3 -5
- package/lib/util/events.js +23 -30
- package/lib/util/eventtarget.js +5 -14
- package/lib/util/int.js +1 -2
- package/lib/util/logging.js +1 -19
- package/lib/util/md5.js +77 -0
- package/lib/util/strings.js +3 -5
- package/lib/vendor/pako/lib/utils/common.js +8 -17
- package/lib/vendor/pako/lib/zlib/adler32.js +3 -7
- package/lib/vendor/pako/lib/zlib/constants.js +2 -5
- package/lib/vendor/pako/lib/zlib/crc32.js +5 -12
- package/lib/vendor/pako/lib/zlib/deflate.js +213 -618
- package/lib/vendor/pako/lib/zlib/gzheader.js +1 -13
- package/lib/vendor/pako/lib/zlib/inffast.js +60 -176
- package/lib/vendor/pako/lib/zlib/inflate.js +398 -888
- package/lib/vendor/pako/lib/zlib/inftrees.js +63 -169
- package/lib/vendor/pako/lib/zlib/messages.js +1 -11
- package/lib/vendor/pako/lib/zlib/trees.js +246 -588
- package/lib/vendor/pako/lib/zlib/zstream.js +2 -18
- package/lib/websock.js +37 -88
- package/package.json +32 -35
|
@@ -4,26 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = GZheader;
|
|
7
|
-
|
|
8
7
|
function GZheader() {
|
|
9
8
|
/* true if compressed data believed to be text */
|
|
10
9
|
this.text = 0;
|
|
11
10
|
/* modification time */
|
|
12
|
-
|
|
13
11
|
this.time = 0;
|
|
14
12
|
/* extra flags (not used when writing a gzip file) */
|
|
15
|
-
|
|
16
13
|
this.xflags = 0;
|
|
17
14
|
/* operating system */
|
|
18
|
-
|
|
19
15
|
this.os = 0;
|
|
20
16
|
/* pointer to extra field or Z_NULL if none */
|
|
21
|
-
|
|
22
17
|
this.extra = null;
|
|
23
18
|
/* extra field length (valid if extra != Z_NULL) */
|
|
24
|
-
|
|
25
19
|
this.extra_len = 0; // Actually, we don't need it in JS,
|
|
26
20
|
// but leave for few code modifications
|
|
21
|
+
|
|
27
22
|
//
|
|
28
23
|
// Setup limits is not necessary because in js we should not preallocate memory
|
|
29
24
|
// for inflate use constant limit in 65536 bytes
|
|
@@ -31,23 +26,16 @@ function GZheader() {
|
|
|
31
26
|
|
|
32
27
|
/* space at extra (only when reading header) */
|
|
33
28
|
// this.extra_max = 0;
|
|
34
|
-
|
|
35
29
|
/* pointer to zero-terminated file name or Z_NULL */
|
|
36
|
-
|
|
37
30
|
this.name = '';
|
|
38
31
|
/* space at name (only when reading header) */
|
|
39
32
|
// this.name_max = 0;
|
|
40
|
-
|
|
41
33
|
/* pointer to zero-terminated comment or Z_NULL */
|
|
42
|
-
|
|
43
34
|
this.comment = '';
|
|
44
35
|
/* space at comment (only when reading header) */
|
|
45
36
|
// this.comm_max = 0;
|
|
46
|
-
|
|
47
37
|
/* true if there was or will be a header crc */
|
|
48
|
-
|
|
49
38
|
this.hcrc = 0;
|
|
50
39
|
/* true when done reading gzip header (not used when writing a gzip file) */
|
|
51
|
-
|
|
52
40
|
this.done = false;
|
|
53
41
|
}
|
|
@@ -5,11 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = inflate_fast;
|
|
7
7
|
// See state defs from inflate.js
|
|
8
|
-
var BAD = 30;
|
|
9
|
-
/*
|
|
10
|
-
|
|
11
|
-
var TYPE = 12;
|
|
12
|
-
/* i: waiting for type bits, including last-flag bit */
|
|
8
|
+
var BAD = 30; /* got a data error -- remain here until reset */
|
|
9
|
+
var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
|
|
13
10
|
|
|
14
11
|
/*
|
|
15
12
|
Decode literal, length, and distance codes and write out the resulting
|
|
@@ -46,97 +43,49 @@ var TYPE = 12;
|
|
|
46
43
|
requires strm.avail_out >= 258 for each loop to avoid checking for
|
|
47
44
|
output space.
|
|
48
45
|
*/
|
|
49
|
-
|
|
50
46
|
function inflate_fast(strm, start) {
|
|
51
47
|
var state;
|
|
52
|
-
|
|
53
|
-
var
|
|
54
|
-
/* local strm.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var last;
|
|
58
|
-
/* have enough input while in < last */
|
|
59
|
-
|
|
60
|
-
var _out;
|
|
61
|
-
/* local strm.output */
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
var beg;
|
|
65
|
-
/* inflate()'s initial strm.output */
|
|
66
|
-
|
|
67
|
-
var end;
|
|
68
|
-
/* while out < end, enough space available */
|
|
48
|
+
var _in; /* local strm.input */
|
|
49
|
+
var last; /* have enough input while in < last */
|
|
50
|
+
var _out; /* local strm.output */
|
|
51
|
+
var beg; /* inflate()'s initial strm.output */
|
|
52
|
+
var end; /* while out < end, enough space available */
|
|
69
53
|
//#ifdef INFLATE_STRICT
|
|
70
|
-
|
|
71
|
-
var dmax;
|
|
72
|
-
/* maximum distance from zlib header */
|
|
54
|
+
var dmax; /* maximum distance from zlib header */
|
|
73
55
|
//#endif
|
|
74
|
-
|
|
75
|
-
var
|
|
76
|
-
/* window
|
|
77
|
-
|
|
78
|
-
var whave;
|
|
79
|
-
/* valid bytes in the window */
|
|
80
|
-
|
|
81
|
-
var wnext;
|
|
82
|
-
/* window write index */
|
|
56
|
+
var wsize; /* window size or zero if not using window */
|
|
57
|
+
var whave; /* valid bytes in the window */
|
|
58
|
+
var wnext; /* window write index */
|
|
83
59
|
// Use `s_window` instead `window`, avoid conflict with instrumentation tools
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
var
|
|
89
|
-
/*
|
|
90
|
-
|
|
91
|
-
var
|
|
92
|
-
/*
|
|
93
|
-
|
|
94
|
-
var lcode;
|
|
95
|
-
/* local strm.lencode */
|
|
96
|
-
|
|
97
|
-
var dcode;
|
|
98
|
-
/* local strm.distcode */
|
|
99
|
-
|
|
100
|
-
var lmask;
|
|
101
|
-
/* mask for first level of length codes */
|
|
102
|
-
|
|
103
|
-
var dmask;
|
|
104
|
-
/* mask for first level of distance codes */
|
|
105
|
-
|
|
106
|
-
var here;
|
|
107
|
-
/* retrieved table entry */
|
|
108
|
-
|
|
109
|
-
var op;
|
|
110
|
-
/* code bits, operation, extra bits, or */
|
|
111
|
-
|
|
60
|
+
var s_window; /* allocated sliding window, if wsize != 0 */
|
|
61
|
+
var hold; /* local strm.hold */
|
|
62
|
+
var bits; /* local strm.bits */
|
|
63
|
+
var lcode; /* local strm.lencode */
|
|
64
|
+
var dcode; /* local strm.distcode */
|
|
65
|
+
var lmask; /* mask for first level of length codes */
|
|
66
|
+
var dmask; /* mask for first level of distance codes */
|
|
67
|
+
var here; /* retrieved table entry */
|
|
68
|
+
var op; /* code bits, operation, extra bits, or */
|
|
112
69
|
/* window position, window bytes to copy */
|
|
113
|
-
|
|
114
|
-
var
|
|
115
|
-
/*
|
|
116
|
-
|
|
117
|
-
var dist;
|
|
118
|
-
/* match distance */
|
|
119
|
-
|
|
120
|
-
var from;
|
|
121
|
-
/* where to copy match from */
|
|
122
|
-
|
|
70
|
+
var len; /* match length, unused bytes */
|
|
71
|
+
var dist; /* match distance */
|
|
72
|
+
var from; /* where to copy match from */
|
|
123
73
|
var from_source;
|
|
124
74
|
var input, output; // JS specific, because we have no pointers
|
|
125
75
|
|
|
126
76
|
/* copy state to local variables */
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
77
|
+
state = strm.state;
|
|
78
|
+
//here = state.here;
|
|
130
79
|
_in = strm.next_in;
|
|
131
80
|
input = strm.input;
|
|
132
81
|
last = _in + (strm.avail_in - 5);
|
|
133
82
|
_out = strm.next_out;
|
|
134
83
|
output = strm.output;
|
|
135
84
|
beg = _out - (start - strm.avail_out);
|
|
136
|
-
end = _out + (strm.avail_out - 257);
|
|
137
|
-
|
|
138
|
-
dmax = state.dmax;
|
|
139
|
-
|
|
85
|
+
end = _out + (strm.avail_out - 257);
|
|
86
|
+
//#ifdef INFLATE_STRICT
|
|
87
|
+
dmax = state.dmax;
|
|
88
|
+
//#endif
|
|
140
89
|
wsize = state.wsize;
|
|
141
90
|
whave = state.whave;
|
|
142
91
|
wnext = state.wnext;
|
|
@@ -147,6 +96,7 @@ function inflate_fast(strm, start) {
|
|
|
147
96
|
dcode = state.distcode;
|
|
148
97
|
lmask = (1 << state.lenbits) - 1;
|
|
149
98
|
dmask = (1 << state.distbits) - 1;
|
|
99
|
+
|
|
150
100
|
/* decode literals and length/distances until end-of-block or not enough
|
|
151
101
|
input data or output space */
|
|
152
102
|
|
|
@@ -157,112 +107,82 @@ function inflate_fast(strm, start) {
|
|
|
157
107
|
hold += input[_in++] << bits;
|
|
158
108
|
bits += 8;
|
|
159
109
|
}
|
|
160
|
-
|
|
161
110
|
here = lcode[hold & lmask];
|
|
162
|
-
|
|
163
111
|
dolen: for (;;) {
|
|
164
112
|
// Goto emulation
|
|
165
|
-
op = here >>> 24
|
|
166
|
-
/*here.bits*/
|
|
167
|
-
;
|
|
113
|
+
op = here >>> 24 /*here.bits*/;
|
|
168
114
|
hold >>>= op;
|
|
169
115
|
bits -= op;
|
|
170
|
-
op = here >>> 16 & 0xff
|
|
171
|
-
/*here.op*/
|
|
172
|
-
;
|
|
173
|
-
|
|
116
|
+
op = here >>> 16 & 0xff /*here.op*/;
|
|
174
117
|
if (op === 0) {
|
|
175
118
|
/* literal */
|
|
176
119
|
//Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
|
|
177
120
|
// "inflate: literal '%c'\n" :
|
|
178
121
|
// "inflate: literal 0x%02x\n", here.val));
|
|
179
|
-
output[_out++] = here & 0xffff
|
|
180
|
-
/*here.val*/
|
|
181
|
-
;
|
|
122
|
+
output[_out++] = here & 0xffff /*here.val*/;
|
|
182
123
|
} else if (op & 16) {
|
|
183
124
|
/* length base */
|
|
184
|
-
len = here & 0xffff
|
|
185
|
-
/*
|
|
186
|
-
;
|
|
187
|
-
op &= 15;
|
|
188
|
-
/* number of extra bits */
|
|
189
|
-
|
|
125
|
+
len = here & 0xffff /*here.val*/;
|
|
126
|
+
op &= 15; /* number of extra bits */
|
|
190
127
|
if (op) {
|
|
191
128
|
if (bits < op) {
|
|
192
129
|
hold += input[_in++] << bits;
|
|
193
130
|
bits += 8;
|
|
194
131
|
}
|
|
195
|
-
|
|
196
132
|
len += hold & (1 << op) - 1;
|
|
197
133
|
hold >>>= op;
|
|
198
134
|
bits -= op;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
135
|
+
}
|
|
136
|
+
//Tracevv((stderr, "inflate: length %u\n", len));
|
|
202
137
|
if (bits < 15) {
|
|
203
138
|
hold += input[_in++] << bits;
|
|
204
139
|
bits += 8;
|
|
205
140
|
hold += input[_in++] << bits;
|
|
206
141
|
bits += 8;
|
|
207
142
|
}
|
|
208
|
-
|
|
209
143
|
here = dcode[hold & dmask];
|
|
210
|
-
|
|
211
144
|
dodist: for (;;) {
|
|
212
145
|
// goto emulation
|
|
213
|
-
op = here >>> 24
|
|
214
|
-
/*here.bits*/
|
|
215
|
-
;
|
|
146
|
+
op = here >>> 24 /*here.bits*/;
|
|
216
147
|
hold >>>= op;
|
|
217
148
|
bits -= op;
|
|
218
|
-
op = here >>> 16 & 0xff
|
|
219
|
-
/*here.op*/
|
|
220
|
-
;
|
|
149
|
+
op = here >>> 16 & 0xff /*here.op*/;
|
|
221
150
|
|
|
222
151
|
if (op & 16) {
|
|
223
152
|
/* distance base */
|
|
224
|
-
dist = here & 0xffff
|
|
225
|
-
/*
|
|
226
|
-
;
|
|
227
|
-
op &= 15;
|
|
228
|
-
/* number of extra bits */
|
|
229
|
-
|
|
153
|
+
dist = here & 0xffff /*here.val*/;
|
|
154
|
+
op &= 15; /* number of extra bits */
|
|
230
155
|
if (bits < op) {
|
|
231
156
|
hold += input[_in++] << bits;
|
|
232
157
|
bits += 8;
|
|
233
|
-
|
|
234
158
|
if (bits < op) {
|
|
235
159
|
hold += input[_in++] << bits;
|
|
236
160
|
bits += 8;
|
|
237
161
|
}
|
|
238
162
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
163
|
+
dist += hold & (1 << op) - 1;
|
|
164
|
+
//#ifdef INFLATE_STRICT
|
|
242
165
|
if (dist > dmax) {
|
|
243
166
|
strm.msg = 'invalid distance too far back';
|
|
244
167
|
state.mode = BAD;
|
|
245
168
|
break top;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
169
|
+
}
|
|
170
|
+
//#endif
|
|
249
171
|
hold >>>= op;
|
|
250
|
-
bits -= op;
|
|
251
|
-
|
|
252
|
-
op = _out - beg;
|
|
253
|
-
/* max distance in output */
|
|
254
|
-
|
|
172
|
+
bits -= op;
|
|
173
|
+
//Tracevv((stderr, "inflate: distance %u\n", dist));
|
|
174
|
+
op = _out - beg; /* max distance in output */
|
|
255
175
|
if (dist > op) {
|
|
256
176
|
/* see if copy from window */
|
|
257
|
-
op = dist - op;
|
|
258
|
-
/* distance back in window */
|
|
259
|
-
|
|
177
|
+
op = dist - op; /* distance back in window */
|
|
260
178
|
if (op > whave) {
|
|
261
179
|
if (state.sane) {
|
|
262
180
|
strm.msg = 'invalid distance too far back';
|
|
263
181
|
state.mode = BAD;
|
|
264
182
|
break top;
|
|
265
|
-
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// (!) This block is disabled in zlib defailts,
|
|
266
186
|
// don't enable it for binary compatibility
|
|
267
187
|
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
|
|
268
188
|
// if (len <= op - whave) {
|
|
@@ -283,97 +203,71 @@ function inflate_fast(strm, start) {
|
|
|
283
203
|
// continue top;
|
|
284
204
|
// }
|
|
285
205
|
//#endif
|
|
286
|
-
|
|
287
206
|
}
|
|
288
207
|
|
|
289
208
|
from = 0; // window index
|
|
290
|
-
|
|
291
209
|
from_source = s_window;
|
|
292
|
-
|
|
293
210
|
if (wnext === 0) {
|
|
294
211
|
/* very common case */
|
|
295
212
|
from += wsize - op;
|
|
296
|
-
|
|
297
213
|
if (op < len) {
|
|
298
214
|
/* some from window */
|
|
299
215
|
len -= op;
|
|
300
|
-
|
|
301
216
|
do {
|
|
302
217
|
output[_out++] = s_window[from++];
|
|
303
218
|
} while (--op);
|
|
304
|
-
|
|
305
|
-
from = _out - dist;
|
|
306
|
-
/* rest from output */
|
|
307
|
-
|
|
219
|
+
from = _out - dist; /* rest from output */
|
|
308
220
|
from_source = output;
|
|
309
221
|
}
|
|
310
222
|
} else if (wnext < op) {
|
|
311
223
|
/* wrap around window */
|
|
312
224
|
from += wsize + wnext - op;
|
|
313
225
|
op -= wnext;
|
|
314
|
-
|
|
315
226
|
if (op < len) {
|
|
316
227
|
/* some from end of window */
|
|
317
228
|
len -= op;
|
|
318
|
-
|
|
319
229
|
do {
|
|
320
230
|
output[_out++] = s_window[from++];
|
|
321
231
|
} while (--op);
|
|
322
|
-
|
|
323
232
|
from = 0;
|
|
324
|
-
|
|
325
233
|
if (wnext < len) {
|
|
326
234
|
/* some from start of window */
|
|
327
235
|
op = wnext;
|
|
328
236
|
len -= op;
|
|
329
|
-
|
|
330
237
|
do {
|
|
331
238
|
output[_out++] = s_window[from++];
|
|
332
239
|
} while (--op);
|
|
333
|
-
|
|
334
|
-
from = _out - dist;
|
|
335
|
-
/* rest from output */
|
|
336
|
-
|
|
240
|
+
from = _out - dist; /* rest from output */
|
|
337
241
|
from_source = output;
|
|
338
242
|
}
|
|
339
243
|
}
|
|
340
244
|
} else {
|
|
341
245
|
/* contiguous in window */
|
|
342
246
|
from += wnext - op;
|
|
343
|
-
|
|
344
247
|
if (op < len) {
|
|
345
248
|
/* some from window */
|
|
346
249
|
len -= op;
|
|
347
|
-
|
|
348
250
|
do {
|
|
349
251
|
output[_out++] = s_window[from++];
|
|
350
252
|
} while (--op);
|
|
351
|
-
|
|
352
|
-
from = _out - dist;
|
|
353
|
-
/* rest from output */
|
|
354
|
-
|
|
253
|
+
from = _out - dist; /* rest from output */
|
|
355
254
|
from_source = output;
|
|
356
255
|
}
|
|
357
256
|
}
|
|
358
|
-
|
|
359
257
|
while (len > 2) {
|
|
360
258
|
output[_out++] = from_source[from++];
|
|
361
259
|
output[_out++] = from_source[from++];
|
|
362
260
|
output[_out++] = from_source[from++];
|
|
363
261
|
len -= 3;
|
|
364
262
|
}
|
|
365
|
-
|
|
366
263
|
if (len) {
|
|
367
264
|
output[_out++] = from_source[from++];
|
|
368
|
-
|
|
369
265
|
if (len > 1) {
|
|
370
266
|
output[_out++] = from_source[from++];
|
|
371
267
|
}
|
|
372
268
|
}
|
|
373
269
|
} else {
|
|
374
|
-
from = _out - dist;
|
|
375
|
-
/* copy direct from output */
|
|
376
|
-
|
|
270
|
+
from = _out - dist; /* copy direct from output */
|
|
377
271
|
do {
|
|
378
272
|
/* minimum length is three */
|
|
379
273
|
output[_out++] = output[from++];
|
|
@@ -381,10 +275,8 @@ function inflate_fast(strm, start) {
|
|
|
381
275
|
output[_out++] = output[from++];
|
|
382
276
|
len -= 3;
|
|
383
277
|
} while (len > 2);
|
|
384
|
-
|
|
385
278
|
if (len) {
|
|
386
279
|
output[_out++] = output[from++];
|
|
387
|
-
|
|
388
280
|
if (len > 1) {
|
|
389
281
|
output[_out++] = output[from++];
|
|
390
282
|
}
|
|
@@ -392,23 +284,18 @@ function inflate_fast(strm, start) {
|
|
|
392
284
|
}
|
|
393
285
|
} else if ((op & 64) === 0) {
|
|
394
286
|
/* 2nd level distance code */
|
|
395
|
-
here = dcode[(here & 0xffff
|
|
396
|
-
/*here.val*/
|
|
397
|
-
) + (hold & (1 << op) - 1)];
|
|
287
|
+
here = dcode[(here & 0xffff /*here.val*/) + (hold & (1 << op) - 1)];
|
|
398
288
|
continue dodist;
|
|
399
289
|
} else {
|
|
400
290
|
strm.msg = 'invalid distance code';
|
|
401
291
|
state.mode = BAD;
|
|
402
292
|
break top;
|
|
403
293
|
}
|
|
404
|
-
|
|
405
294
|
break; // need to emulate goto via "continue"
|
|
406
295
|
}
|
|
407
296
|
} else if ((op & 64) === 0) {
|
|
408
297
|
/* 2nd level length code */
|
|
409
|
-
here = lcode[(here & 0xffff
|
|
410
|
-
/*here.val*/
|
|
411
|
-
) + (hold & (1 << op) - 1)];
|
|
298
|
+
here = lcode[(here & 0xffff /*here.val*/) + (hold & (1 << op) - 1)];
|
|
412
299
|
continue dolen;
|
|
413
300
|
} else if (op & 32) {
|
|
414
301
|
/* end-of-block */
|
|
@@ -420,19 +307,17 @@ function inflate_fast(strm, start) {
|
|
|
420
307
|
state.mode = BAD;
|
|
421
308
|
break top;
|
|
422
309
|
}
|
|
423
|
-
|
|
424
310
|
break; // need to emulate goto via "continue"
|
|
425
311
|
}
|
|
426
312
|
} while (_in < last && _out < end);
|
|
427
|
-
/* return unused bytes (on entry, bits < 8, so in won't go too far back) */
|
|
428
|
-
|
|
429
313
|
|
|
314
|
+
/* return unused bytes (on entry, bits < 8, so in won't go too far back) */
|
|
430
315
|
len = bits >> 3;
|
|
431
316
|
_in -= len;
|
|
432
317
|
bits -= len << 3;
|
|
433
318
|
hold &= (1 << bits) - 1;
|
|
434
|
-
/* update state and return */
|
|
435
319
|
|
|
320
|
+
/* update state and return */
|
|
436
321
|
strm.next_in = _in;
|
|
437
322
|
strm.next_out = _out;
|
|
438
323
|
strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last);
|
|
@@ -441,5 +326,4 @@ function inflate_fast(strm, start) {
|
|
|
441
326
|
state.bits = bits;
|
|
442
327
|
return;
|
|
443
328
|
}
|
|
444
|
-
|
|
445
329
|
;
|