mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-05-04 10:33:48 +01:00
browser files rebuild
This commit is contained in:
parent
02af90ea69
commit
a25bfa041a
6 changed files with 440 additions and 424 deletions
68
dist/pako.js
vendored
68
dist/pako.js
vendored
|
@ -1,12 +1,12 @@
|
||||||
/* pako 0.2.8 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
/* pako 1.0.0 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
var zlib_deflate = require('./zlib/deflate.js');
|
var zlib_deflate = require('./zlib/deflate');
|
||||||
var utils = require('./utils/common');
|
var utils = require('./utils/common');
|
||||||
var strings = require('./utils/strings');
|
var strings = require('./utils/strings');
|
||||||
var msg = require('./zlib/messages');
|
var msg = require('./zlib/messages');
|
||||||
var zstream = require('./zlib/zstream');
|
var ZStream = require('./zlib/zstream');
|
||||||
|
|
||||||
var toString = Object.prototype.toString;
|
var toString = Object.prototype.toString;
|
||||||
|
|
||||||
|
@ -117,7 +117,8 @@ var Z_DEFLATED = 8;
|
||||||
* console.log(deflate.result);
|
* console.log(deflate.result);
|
||||||
* ```
|
* ```
|
||||||
**/
|
**/
|
||||||
var Deflate = function(options) {
|
function Deflate(options) {
|
||||||
|
if (!(this instanceof Deflate)) return new Deflate(options);
|
||||||
|
|
||||||
this.options = utils.assign({
|
this.options = utils.assign({
|
||||||
level: Z_DEFAULT_COMPRESSION,
|
level: Z_DEFAULT_COMPRESSION,
|
||||||
|
@ -144,7 +145,7 @@ var Deflate = function(options) {
|
||||||
this.ended = false; // used to avoid multiple onEnd() calls
|
this.ended = false; // used to avoid multiple onEnd() calls
|
||||||
this.chunks = []; // chunks of compressed data
|
this.chunks = []; // chunks of compressed data
|
||||||
|
|
||||||
this.strm = new zstream();
|
this.strm = new ZStream();
|
||||||
this.strm.avail_out = 0;
|
this.strm.avail_out = 0;
|
||||||
|
|
||||||
var status = zlib_deflate.deflateInit2(
|
var status = zlib_deflate.deflateInit2(
|
||||||
|
@ -163,7 +164,7 @@ var Deflate = function(options) {
|
||||||
if (opt.header) {
|
if (opt.header) {
|
||||||
zlib_deflate.deflateSetHeader(this.strm, opt.header);
|
zlib_deflate.deflateSetHeader(this.strm, opt.header);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deflate#push(data[, mode]) -> Boolean
|
* Deflate#push(data[, mode]) -> Boolean
|
||||||
|
@ -376,17 +377,17 @@ exports.deflate = deflate;
|
||||||
exports.deflateRaw = deflateRaw;
|
exports.deflateRaw = deflateRaw;
|
||||||
exports.gzip = gzip;
|
exports.gzip = gzip;
|
||||||
|
|
||||||
},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate.js":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){
|
},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
var zlib_inflate = require('./zlib/inflate.js');
|
var zlib_inflate = require('./zlib/inflate');
|
||||||
var utils = require('./utils/common');
|
var utils = require('./utils/common');
|
||||||
var strings = require('./utils/strings');
|
var strings = require('./utils/strings');
|
||||||
var c = require('./zlib/constants');
|
var c = require('./zlib/constants');
|
||||||
var msg = require('./zlib/messages');
|
var msg = require('./zlib/messages');
|
||||||
var zstream = require('./zlib/zstream');
|
var ZStream = require('./zlib/zstream');
|
||||||
var gzheader = require('./zlib/gzheader');
|
var GZheader = require('./zlib/gzheader');
|
||||||
|
|
||||||
var toString = Object.prototype.toString;
|
var toString = Object.prototype.toString;
|
||||||
|
|
||||||
|
@ -468,7 +469,8 @@ var toString = Object.prototype.toString;
|
||||||
* console.log(inflate.result);
|
* console.log(inflate.result);
|
||||||
* ```
|
* ```
|
||||||
**/
|
**/
|
||||||
var Inflate = function(options) {
|
function Inflate(options) {
|
||||||
|
if (!(this instanceof Inflate)) return new Inflate(options);
|
||||||
|
|
||||||
this.options = utils.assign({
|
this.options = utils.assign({
|
||||||
chunkSize: 16384,
|
chunkSize: 16384,
|
||||||
|
@ -506,7 +508,7 @@ var Inflate = function(options) {
|
||||||
this.ended = false; // used to avoid multiple onEnd() calls
|
this.ended = false; // used to avoid multiple onEnd() calls
|
||||||
this.chunks = []; // chunks of compressed data
|
this.chunks = []; // chunks of compressed data
|
||||||
|
|
||||||
this.strm = new zstream();
|
this.strm = new ZStream();
|
||||||
this.strm.avail_out = 0;
|
this.strm.avail_out = 0;
|
||||||
|
|
||||||
var status = zlib_inflate.inflateInit2(
|
var status = zlib_inflate.inflateInit2(
|
||||||
|
@ -518,10 +520,10 @@ var Inflate = function(options) {
|
||||||
throw new Error(msg[status]);
|
throw new Error(msg[status]);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.header = new gzheader();
|
this.header = new GZheader();
|
||||||
|
|
||||||
zlib_inflate.inflateGetHeader(this.strm, this.header);
|
zlib_inflate.inflateGetHeader(this.strm, this.header);
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inflate#push(data[, mode]) -> Boolean
|
* Inflate#push(data[, mode]) -> Boolean
|
||||||
|
@ -778,7 +780,7 @@ exports.inflate = inflate;
|
||||||
exports.inflateRaw = inflateRaw;
|
exports.inflateRaw = inflateRaw;
|
||||||
exports.ungzip = inflate;
|
exports.ungzip = inflate;
|
||||||
|
|
||||||
},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate.js":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){
|
},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
|
@ -1104,6 +1106,9 @@ function adler32(adler, buf, len, pos) {
|
||||||
module.exports = adler32;
|
module.exports = adler32;
|
||||||
|
|
||||||
},{}],6:[function(require,module,exports){
|
},{}],6:[function(require,module,exports){
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
/* Allowed flush values; see deflate() and inflate() below for details */
|
/* Allowed flush values; see deflate() and inflate() below for details */
|
||||||
|
@ -1183,7 +1188,7 @@ function crc32(crc, buf, len, pos) {
|
||||||
var t = crcTable,
|
var t = crcTable,
|
||||||
end = pos + len;
|
end = pos + len;
|
||||||
|
|
||||||
crc = crc ^ (-1);
|
crc ^= -1;
|
||||||
|
|
||||||
for (var i = pos; i < end; i++) {
|
for (var i = pos; i < end; i++) {
|
||||||
crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
|
crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
|
||||||
|
@ -2215,13 +2220,13 @@ function deflate_huff(s, flush) {
|
||||||
* exclude worst case performance for pathological files. Better values may be
|
* exclude worst case performance for pathological files. Better values may be
|
||||||
* found for specific files.
|
* found for specific files.
|
||||||
*/
|
*/
|
||||||
var Config = function (good_length, max_lazy, nice_length, max_chain, func) {
|
function Config(good_length, max_lazy, nice_length, max_chain, func) {
|
||||||
this.good_length = good_length;
|
this.good_length = good_length;
|
||||||
this.max_lazy = max_lazy;
|
this.max_lazy = max_lazy;
|
||||||
this.nice_length = nice_length;
|
this.nice_length = nice_length;
|
||||||
this.max_chain = max_chain;
|
this.max_chain = max_chain;
|
||||||
this.func = func;
|
this.func = func;
|
||||||
};
|
}
|
||||||
|
|
||||||
var configuration_table;
|
var configuration_table;
|
||||||
|
|
||||||
|
@ -3427,7 +3432,7 @@ var MAX_WBITS = 15;
|
||||||
var DEF_WBITS = MAX_WBITS;
|
var DEF_WBITS = MAX_WBITS;
|
||||||
|
|
||||||
|
|
||||||
function ZSWAP32(q) {
|
function zswap32(q) {
|
||||||
return (((q >>> 24) & 0xff) +
|
return (((q >>> 24) & 0xff) +
|
||||||
((q >>> 8) & 0xff00) +
|
((q >>> 8) & 0xff00) +
|
||||||
((q & 0xff00) << 8) +
|
((q & 0xff00) << 8) +
|
||||||
|
@ -4046,7 +4051,7 @@ function inflate(strm, flush) {
|
||||||
state.head.hcrc = ((state.flags >> 9) & 1);
|
state.head.hcrc = ((state.flags >> 9) & 1);
|
||||||
state.head.done = true;
|
state.head.done = true;
|
||||||
}
|
}
|
||||||
strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/;
|
strm.adler = state.check = 0;
|
||||||
state.mode = TYPE;
|
state.mode = TYPE;
|
||||||
break;
|
break;
|
||||||
case DICTID:
|
case DICTID:
|
||||||
|
@ -4058,7 +4063,7 @@ function inflate(strm, flush) {
|
||||||
bits += 8;
|
bits += 8;
|
||||||
}
|
}
|
||||||
//===//
|
//===//
|
||||||
strm.adler = state.check = ZSWAP32(hold);
|
strm.adler = state.check = zswap32(hold);
|
||||||
//=== INITBITS();
|
//=== INITBITS();
|
||||||
hold = 0;
|
hold = 0;
|
||||||
bits = 0;
|
bits = 0;
|
||||||
|
@ -4692,8 +4697,8 @@ function inflate(strm, flush) {
|
||||||
|
|
||||||
}
|
}
|
||||||
_out = left;
|
_out = left;
|
||||||
// NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too
|
// NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
|
||||||
if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) {
|
if ((state.flags ? hold : zswap32(hold)) !== state.check) {
|
||||||
strm.msg = 'incorrect data check';
|
strm.msg = 'incorrect data check';
|
||||||
state.mode = BAD;
|
state.mode = BAD;
|
||||||
break;
|
break;
|
||||||
|
@ -5170,9 +5175,9 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, ta
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'2': 'need dictionary', /* Z_NEED_DICT 2 */
|
2: 'need dictionary', /* Z_NEED_DICT 2 */
|
||||||
'1': 'stream end', /* Z_STREAM_END 1 */
|
1: 'stream end', /* Z_STREAM_END 1 */
|
||||||
'0': '', /* Z_OK 0 */
|
0: '', /* Z_OK 0 */
|
||||||
'-1': 'file error', /* Z_ERRNO (-1) */
|
'-1': 'file error', /* Z_ERRNO (-1) */
|
||||||
'-2': 'stream error', /* Z_STREAM_ERROR (-2) */
|
'-2': 'stream error', /* Z_STREAM_ERROR (-2) */
|
||||||
'-3': 'data error', /* Z_DATA_ERROR (-3) */
|
'-3': 'data error', /* Z_DATA_ERROR (-3) */
|
||||||
|
@ -5268,6 +5273,7 @@ var REPZ_3_10 = 17;
|
||||||
var REPZ_11_138 = 18;
|
var REPZ_11_138 = 18;
|
||||||
/* repeat a zero length 11-138 times (7 bits of repeat count) */
|
/* repeat a zero length 11-138 times (7 bits of repeat count) */
|
||||||
|
|
||||||
|
/* eslint-disable comma-spacing,array-bracket-spacing */
|
||||||
var extra_lbits = /* extra bits for each length code */
|
var extra_lbits = /* extra bits for each length code */
|
||||||
[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];
|
[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];
|
||||||
|
|
||||||
|
@ -5279,6 +5285,8 @@ var extra_blbits = /* extra bits for each bit length code */
|
||||||
|
|
||||||
var bl_order =
|
var bl_order =
|
||||||
[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
|
[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
|
||||||
|
/* eslint-enable comma-spacing,array-bracket-spacing */
|
||||||
|
|
||||||
/* The lengths of the bit length codes are sent in order of decreasing
|
/* The lengths of the bit length codes are sent in order of decreasing
|
||||||
* probability, to avoid transmitting the lengths for unused bit length codes.
|
* probability, to avoid transmitting the lengths for unused bit length codes.
|
||||||
*/
|
*/
|
||||||
|
@ -5326,7 +5334,7 @@ zero(base_dist);
|
||||||
/* First normalized distance for each code (0 = distance of 1) */
|
/* First normalized distance for each code (0 = distance of 1) */
|
||||||
|
|
||||||
|
|
||||||
var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) {
|
function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {
|
||||||
|
|
||||||
this.static_tree = static_tree; /* static tree or NULL */
|
this.static_tree = static_tree; /* static tree or NULL */
|
||||||
this.extra_bits = extra_bits; /* extra bits for each code or NULL */
|
this.extra_bits = extra_bits; /* extra bits for each code or NULL */
|
||||||
|
@ -5336,7 +5344,7 @@ var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_l
|
||||||
|
|
||||||
// show if `static_tree` has data or dummy - needed for monomorphic objects
|
// show if `static_tree` has data or dummy - needed for monomorphic objects
|
||||||
this.has_stree = static_tree && static_tree.length;
|
this.has_stree = static_tree && static_tree.length;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
var static_l_desc;
|
var static_l_desc;
|
||||||
|
@ -5344,11 +5352,11 @@ var static_d_desc;
|
||||||
var static_bl_desc;
|
var static_bl_desc;
|
||||||
|
|
||||||
|
|
||||||
var TreeDesc = function(dyn_tree, stat_desc) {
|
function TreeDesc(dyn_tree, stat_desc) {
|
||||||
this.dyn_tree = dyn_tree; /* the dynamic tree */
|
this.dyn_tree = dyn_tree; /* the dynamic tree */
|
||||||
this.max_code = 0; /* largest code with non zero frequency */
|
this.max_code = 0; /* largest code with non zero frequency */
|
||||||
this.stat_desc = stat_desc; /* the corresponding static tree */
|
this.stat_desc = stat_desc; /* the corresponding static tree */
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
6
dist/pako.min.js
vendored
6
dist/pako.min.js
vendored
File diff suppressed because one or more lines are too long
38
dist/pako_deflate.js
vendored
38
dist/pako_deflate.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/* pako 0.2.8 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
/* pako 1.0.0 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ function crc32(crc, buf, len, pos) {
|
||||||
var t = crcTable,
|
var t = crcTable,
|
||||||
end = pos + len;
|
end = pos + len;
|
||||||
|
|
||||||
crc = crc ^ (-1);
|
crc ^= -1;
|
||||||
|
|
||||||
for (var i = pos; i < end; i++) {
|
for (var i = pos; i < end; i++) {
|
||||||
crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
|
crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
|
||||||
|
@ -1386,13 +1386,13 @@ function deflate_huff(s, flush) {
|
||||||
* exclude worst case performance for pathological files. Better values may be
|
* exclude worst case performance for pathological files. Better values may be
|
||||||
* found for specific files.
|
* found for specific files.
|
||||||
*/
|
*/
|
||||||
var Config = function (good_length, max_lazy, nice_length, max_chain, func) {
|
function Config(good_length, max_lazy, nice_length, max_chain, func) {
|
||||||
this.good_length = good_length;
|
this.good_length = good_length;
|
||||||
this.max_lazy = max_lazy;
|
this.max_lazy = max_lazy;
|
||||||
this.nice_length = nice_length;
|
this.nice_length = nice_length;
|
||||||
this.max_chain = max_chain;
|
this.max_chain = max_chain;
|
||||||
this.func = func;
|
this.func = func;
|
||||||
};
|
}
|
||||||
|
|
||||||
var configuration_table;
|
var configuration_table;
|
||||||
|
|
||||||
|
@ -2137,9 +2137,9 @@ exports.deflateTune = deflateTune;
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'2': 'need dictionary', /* Z_NEED_DICT 2 */
|
2: 'need dictionary', /* Z_NEED_DICT 2 */
|
||||||
'1': 'stream end', /* Z_STREAM_END 1 */
|
1: 'stream end', /* Z_STREAM_END 1 */
|
||||||
'0': '', /* Z_OK 0 */
|
0: '', /* Z_OK 0 */
|
||||||
'-1': 'file error', /* Z_ERRNO (-1) */
|
'-1': 'file error', /* Z_ERRNO (-1) */
|
||||||
'-2': 'stream error', /* Z_STREAM_ERROR (-2) */
|
'-2': 'stream error', /* Z_STREAM_ERROR (-2) */
|
||||||
'-3': 'data error', /* Z_DATA_ERROR (-3) */
|
'-3': 'data error', /* Z_DATA_ERROR (-3) */
|
||||||
|
@ -2235,6 +2235,7 @@ var REPZ_3_10 = 17;
|
||||||
var REPZ_11_138 = 18;
|
var REPZ_11_138 = 18;
|
||||||
/* repeat a zero length 11-138 times (7 bits of repeat count) */
|
/* repeat a zero length 11-138 times (7 bits of repeat count) */
|
||||||
|
|
||||||
|
/* eslint-disable comma-spacing,array-bracket-spacing */
|
||||||
var extra_lbits = /* extra bits for each length code */
|
var extra_lbits = /* extra bits for each length code */
|
||||||
[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];
|
[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];
|
||||||
|
|
||||||
|
@ -2246,6 +2247,8 @@ var extra_blbits = /* extra bits for each bit length code */
|
||||||
|
|
||||||
var bl_order =
|
var bl_order =
|
||||||
[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
|
[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
|
||||||
|
/* eslint-enable comma-spacing,array-bracket-spacing */
|
||||||
|
|
||||||
/* The lengths of the bit length codes are sent in order of decreasing
|
/* The lengths of the bit length codes are sent in order of decreasing
|
||||||
* probability, to avoid transmitting the lengths for unused bit length codes.
|
* probability, to avoid transmitting the lengths for unused bit length codes.
|
||||||
*/
|
*/
|
||||||
|
@ -2293,7 +2296,7 @@ zero(base_dist);
|
||||||
/* First normalized distance for each code (0 = distance of 1) */
|
/* First normalized distance for each code (0 = distance of 1) */
|
||||||
|
|
||||||
|
|
||||||
var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) {
|
function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {
|
||||||
|
|
||||||
this.static_tree = static_tree; /* static tree or NULL */
|
this.static_tree = static_tree; /* static tree or NULL */
|
||||||
this.extra_bits = extra_bits; /* extra bits for each code or NULL */
|
this.extra_bits = extra_bits; /* extra bits for each code or NULL */
|
||||||
|
@ -2303,7 +2306,7 @@ var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_l
|
||||||
|
|
||||||
// show if `static_tree` has data or dummy - needed for monomorphic objects
|
// show if `static_tree` has data or dummy - needed for monomorphic objects
|
||||||
this.has_stree = static_tree && static_tree.length;
|
this.has_stree = static_tree && static_tree.length;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
var static_l_desc;
|
var static_l_desc;
|
||||||
|
@ -2311,11 +2314,11 @@ var static_d_desc;
|
||||||
var static_bl_desc;
|
var static_bl_desc;
|
||||||
|
|
||||||
|
|
||||||
var TreeDesc = function(dyn_tree, stat_desc) {
|
function TreeDesc(dyn_tree, stat_desc) {
|
||||||
this.dyn_tree = dyn_tree; /* the dynamic tree */
|
this.dyn_tree = dyn_tree; /* the dynamic tree */
|
||||||
this.max_code = 0; /* largest code with non zero frequency */
|
this.max_code = 0; /* largest code with non zero frequency */
|
||||||
this.stat_desc = stat_desc; /* the corresponding static tree */
|
this.stat_desc = stat_desc; /* the corresponding static tree */
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3384,11 +3387,11 @@ module.exports = ZStream;
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
var zlib_deflate = require('./zlib/deflate.js');
|
var zlib_deflate = require('./zlib/deflate');
|
||||||
var utils = require('./utils/common');
|
var utils = require('./utils/common');
|
||||||
var strings = require('./utils/strings');
|
var strings = require('./utils/strings');
|
||||||
var msg = require('./zlib/messages');
|
var msg = require('./zlib/messages');
|
||||||
var zstream = require('./zlib/zstream');
|
var ZStream = require('./zlib/zstream');
|
||||||
|
|
||||||
var toString = Object.prototype.toString;
|
var toString = Object.prototype.toString;
|
||||||
|
|
||||||
|
@ -3499,7 +3502,8 @@ var Z_DEFLATED = 8;
|
||||||
* console.log(deflate.result);
|
* console.log(deflate.result);
|
||||||
* ```
|
* ```
|
||||||
**/
|
**/
|
||||||
var Deflate = function(options) {
|
function Deflate(options) {
|
||||||
|
if (!(this instanceof Deflate)) return new Deflate(options);
|
||||||
|
|
||||||
this.options = utils.assign({
|
this.options = utils.assign({
|
||||||
level: Z_DEFAULT_COMPRESSION,
|
level: Z_DEFAULT_COMPRESSION,
|
||||||
|
@ -3526,7 +3530,7 @@ var Deflate = function(options) {
|
||||||
this.ended = false; // used to avoid multiple onEnd() calls
|
this.ended = false; // used to avoid multiple onEnd() calls
|
||||||
this.chunks = []; // chunks of compressed data
|
this.chunks = []; // chunks of compressed data
|
||||||
|
|
||||||
this.strm = new zstream();
|
this.strm = new ZStream();
|
||||||
this.strm.avail_out = 0;
|
this.strm.avail_out = 0;
|
||||||
|
|
||||||
var status = zlib_deflate.deflateInit2(
|
var status = zlib_deflate.deflateInit2(
|
||||||
|
@ -3545,7 +3549,7 @@ var Deflate = function(options) {
|
||||||
if (opt.header) {
|
if (opt.header) {
|
||||||
zlib_deflate.deflateSetHeader(this.strm, opt.header);
|
zlib_deflate.deflateSetHeader(this.strm, opt.header);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deflate#push(data[, mode]) -> Boolean
|
* Deflate#push(data[, mode]) -> Boolean
|
||||||
|
@ -3758,5 +3762,5 @@ exports.deflate = deflate;
|
||||||
exports.deflateRaw = deflateRaw;
|
exports.deflateRaw = deflateRaw;
|
||||||
exports.gzip = gzip;
|
exports.gzip = gzip;
|
||||||
|
|
||||||
},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate.js":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")
|
},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")
|
||||||
});
|
});
|
4
dist/pako_deflate.min.js
vendored
4
dist/pako_deflate.min.js
vendored
File diff suppressed because one or more lines are too long
40
dist/pako_inflate.js
vendored
40
dist/pako_inflate.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/* pako 0.2.8 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
/* pako 1.0.0 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
|
@ -324,6 +324,9 @@ function adler32(adler, buf, len, pos) {
|
||||||
module.exports = adler32;
|
module.exports = adler32;
|
||||||
|
|
||||||
},{}],4:[function(require,module,exports){
|
},{}],4:[function(require,module,exports){
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
/* Allowed flush values; see deflate() and inflate() below for details */
|
/* Allowed flush values; see deflate() and inflate() below for details */
|
||||||
|
@ -403,7 +406,7 @@ function crc32(crc, buf, len, pos) {
|
||||||
var t = crcTable,
|
var t = crcTable,
|
||||||
end = pos + len;
|
end = pos + len;
|
||||||
|
|
||||||
crc = crc ^ (-1);
|
crc ^= -1;
|
||||||
|
|
||||||
for (var i = pos; i < end; i++) {
|
for (var i = pos; i < end; i++) {
|
||||||
crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
|
crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
|
||||||
|
@ -880,7 +883,7 @@ var MAX_WBITS = 15;
|
||||||
var DEF_WBITS = MAX_WBITS;
|
var DEF_WBITS = MAX_WBITS;
|
||||||
|
|
||||||
|
|
||||||
function ZSWAP32(q) {
|
function zswap32(q) {
|
||||||
return (((q >>> 24) & 0xff) +
|
return (((q >>> 24) & 0xff) +
|
||||||
((q >>> 8) & 0xff00) +
|
((q >>> 8) & 0xff00) +
|
||||||
((q & 0xff00) << 8) +
|
((q & 0xff00) << 8) +
|
||||||
|
@ -1499,7 +1502,7 @@ function inflate(strm, flush) {
|
||||||
state.head.hcrc = ((state.flags >> 9) & 1);
|
state.head.hcrc = ((state.flags >> 9) & 1);
|
||||||
state.head.done = true;
|
state.head.done = true;
|
||||||
}
|
}
|
||||||
strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/;
|
strm.adler = state.check = 0;
|
||||||
state.mode = TYPE;
|
state.mode = TYPE;
|
||||||
break;
|
break;
|
||||||
case DICTID:
|
case DICTID:
|
||||||
|
@ -1511,7 +1514,7 @@ function inflate(strm, flush) {
|
||||||
bits += 8;
|
bits += 8;
|
||||||
}
|
}
|
||||||
//===//
|
//===//
|
||||||
strm.adler = state.check = ZSWAP32(hold);
|
strm.adler = state.check = zswap32(hold);
|
||||||
//=== INITBITS();
|
//=== INITBITS();
|
||||||
hold = 0;
|
hold = 0;
|
||||||
bits = 0;
|
bits = 0;
|
||||||
|
@ -2145,8 +2148,8 @@ function inflate(strm, flush) {
|
||||||
|
|
||||||
}
|
}
|
||||||
_out = left;
|
_out = left;
|
||||||
// NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too
|
// NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
|
||||||
if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) {
|
if ((state.flags ? hold : zswap32(hold)) !== state.check) {
|
||||||
strm.msg = 'incorrect data check';
|
strm.msg = 'incorrect data check';
|
||||||
state.mode = BAD;
|
state.mode = BAD;
|
||||||
break;
|
break;
|
||||||
|
@ -2623,9 +2626,9 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, ta
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'2': 'need dictionary', /* Z_NEED_DICT 2 */
|
2: 'need dictionary', /* Z_NEED_DICT 2 */
|
||||||
'1': 'stream end', /* Z_STREAM_END 1 */
|
1: 'stream end', /* Z_STREAM_END 1 */
|
||||||
'0': '', /* Z_OK 0 */
|
0: '', /* Z_OK 0 */
|
||||||
'-1': 'file error', /* Z_ERRNO (-1) */
|
'-1': 'file error', /* Z_ERRNO (-1) */
|
||||||
'-2': 'stream error', /* Z_STREAM_ERROR (-2) */
|
'-2': 'stream error', /* Z_STREAM_ERROR (-2) */
|
||||||
'-3': 'data error', /* Z_DATA_ERROR (-3) */
|
'-3': 'data error', /* Z_DATA_ERROR (-3) */
|
||||||
|
@ -2669,13 +2672,13 @@ module.exports = ZStream;
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
var zlib_inflate = require('./zlib/inflate.js');
|
var zlib_inflate = require('./zlib/inflate');
|
||||||
var utils = require('./utils/common');
|
var utils = require('./utils/common');
|
||||||
var strings = require('./utils/strings');
|
var strings = require('./utils/strings');
|
||||||
var c = require('./zlib/constants');
|
var c = require('./zlib/constants');
|
||||||
var msg = require('./zlib/messages');
|
var msg = require('./zlib/messages');
|
||||||
var zstream = require('./zlib/zstream');
|
var ZStream = require('./zlib/zstream');
|
||||||
var gzheader = require('./zlib/gzheader');
|
var GZheader = require('./zlib/gzheader');
|
||||||
|
|
||||||
var toString = Object.prototype.toString;
|
var toString = Object.prototype.toString;
|
||||||
|
|
||||||
|
@ -2757,7 +2760,8 @@ var toString = Object.prototype.toString;
|
||||||
* console.log(inflate.result);
|
* console.log(inflate.result);
|
||||||
* ```
|
* ```
|
||||||
**/
|
**/
|
||||||
var Inflate = function(options) {
|
function Inflate(options) {
|
||||||
|
if (!(this instanceof Inflate)) return new Inflate(options);
|
||||||
|
|
||||||
this.options = utils.assign({
|
this.options = utils.assign({
|
||||||
chunkSize: 16384,
|
chunkSize: 16384,
|
||||||
|
@ -2795,7 +2799,7 @@ var Inflate = function(options) {
|
||||||
this.ended = false; // used to avoid multiple onEnd() calls
|
this.ended = false; // used to avoid multiple onEnd() calls
|
||||||
this.chunks = []; // chunks of compressed data
|
this.chunks = []; // chunks of compressed data
|
||||||
|
|
||||||
this.strm = new zstream();
|
this.strm = new ZStream();
|
||||||
this.strm.avail_out = 0;
|
this.strm.avail_out = 0;
|
||||||
|
|
||||||
var status = zlib_inflate.inflateInit2(
|
var status = zlib_inflate.inflateInit2(
|
||||||
|
@ -2807,10 +2811,10 @@ var Inflate = function(options) {
|
||||||
throw new Error(msg[status]);
|
throw new Error(msg[status]);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.header = new gzheader();
|
this.header = new GZheader();
|
||||||
|
|
||||||
zlib_inflate.inflateGetHeader(this.strm, this.header);
|
zlib_inflate.inflateGetHeader(this.strm, this.header);
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inflate#push(data[, mode]) -> Boolean
|
* Inflate#push(data[, mode]) -> Boolean
|
||||||
|
@ -3067,5 +3071,5 @@ exports.inflate = inflate;
|
||||||
exports.inflateRaw = inflateRaw;
|
exports.inflateRaw = inflateRaw;
|
||||||
exports.ungzip = inflate;
|
exports.ungzip = inflate;
|
||||||
|
|
||||||
},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate.js":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")
|
},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")
|
||||||
});
|
});
|
4
dist/pako_inflate.min.js
vendored
4
dist/pako_inflate.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue