mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-05-04 10:33:48 +01:00
browser files update
This commit is contained in:
parent
bb43bec724
commit
160301218a
7 changed files with 67 additions and 51 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "pako",
|
"name": "pako",
|
||||||
"main": "dist/pako.js",
|
"main": "dist/pako.js",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"homepage": "https://github.com/nodeca/pako",
|
"homepage": "https://github.com/nodeca/pako",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Andrei Tuputcyn <Andrew.Tupitsin@gmail.com>",
|
"Andrei Tuputcyn <Andrew.Tupitsin@gmail.com>",
|
||||||
|
|
50
dist/pako.js
vendored
50
dist/pako.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/* pako 0.1.0 nodeca/pako */!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.pako=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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(_dereq_,module,exports){
|
/* pako 0.1.1 nodeca/pako */!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.pako=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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(_dereq_,module,exports){
|
||||||
// Top level file is just a mixin of submodules & constants
|
// Top level file is just a mixin of submodules & constants
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1537,8 +1537,7 @@ function deflate_slow(s, flush) {
|
||||||
|
|
||||||
/***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
|
/***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
|
||||||
s.prev_length - MIN_MATCH, bflush);***/
|
s.prev_length - MIN_MATCH, bflush);***/
|
||||||
bflush = trees._tr_tally(s, s.strstart - 1- s.match_start, s.prev_length - MIN_MATCH);
|
bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH);
|
||||||
|
|
||||||
/* Insert in hash table all strings up to the end of the match.
|
/* Insert in hash table all strings up to the end of the match.
|
||||||
* strstart-1 and strstart are already inserted. If there is not
|
* strstart-1 and strstart are already inserted. If there is not
|
||||||
* enough lookahead, the last two strings are not inserted in
|
* enough lookahead, the last two strings are not inserted in
|
||||||
|
@ -2549,6 +2548,10 @@ module.exports = function inflate_fast(strm, start) {
|
||||||
state.mode = BAD;
|
state.mode = BAD;
|
||||||
break top;
|
break top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// (!) This block is disabled in zlib defailts,
|
||||||
|
// don't enable it for binary compatibility
|
||||||
|
|
||||||
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
|
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
|
||||||
// if (len <= op - whave) {
|
// if (len <= op - whave) {
|
||||||
// do {
|
// do {
|
||||||
|
@ -2840,7 +2843,7 @@ function InflateState() {
|
||||||
//unsigned short array
|
//unsigned short array
|
||||||
//todo: test later with Uint16Array
|
//todo: test later with Uint16Array
|
||||||
this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
|
this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
|
||||||
this.work = new utils.Buf16(280); /* work area for code table building */
|
this.work = new utils.Buf16(288); /* work area for code table building */
|
||||||
|
|
||||||
// TODO: 8 or 16 bits?
|
// TODO: 8 or 16 bits?
|
||||||
this.codes = new utils.Buf32(ENOUGH); /* space for code tables */
|
this.codes = new utils.Buf32(ENOUGH); /* space for code tables */
|
||||||
|
@ -5679,7 +5682,7 @@ function _tr_tally(s, dist, lc)
|
||||||
// unsigned dist; /* distance of matched string */
|
// unsigned dist; /* distance of matched string */
|
||||||
// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
|
// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
|
||||||
{
|
{
|
||||||
var out_length, in_length, dcode;
|
//var out_length, in_length, dcode;
|
||||||
|
|
||||||
s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;
|
s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;
|
||||||
s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;
|
s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;
|
||||||
|
@ -5702,23 +5705,28 @@ function _tr_tally(s, dist, lc)
|
||||||
s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
|
s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to guess if it is profitable to stop the current block here */
|
// (!) This block is disabled in zlib defailts,
|
||||||
if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
|
// don't enable it for binary compatibility
|
||||||
/* Compute an upper bound for the compressed length */
|
|
||||||
out_length = s.last_lit*8;
|
|
||||||
in_length = s.strstart - s.block_start;
|
|
||||||
|
|
||||||
for (dcode = 0; dcode < D_CODES; dcode++) {
|
//#ifdef TRUNCATE_BLOCK
|
||||||
out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
|
// /* Try to guess if it is profitable to stop the current block here */
|
||||||
}
|
// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
|
||||||
out_length >>>= 3;
|
// /* Compute an upper bound for the compressed length */
|
||||||
//Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
|
// out_length = s.last_lit*8;
|
||||||
// s->last_lit, in_length, out_length,
|
// in_length = s.strstart - s.block_start;
|
||||||
// 100L - out_length*100L/in_length));
|
//
|
||||||
if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
|
// for (dcode = 0; dcode < D_CODES; dcode++) {
|
||||||
return true;
|
// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
|
||||||
}
|
// }
|
||||||
}
|
// out_length >>>= 3;
|
||||||
|
// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
|
||||||
|
// // s->last_lit, in_length, out_length,
|
||||||
|
// // 100L - out_length*100L/in_length));
|
||||||
|
// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//#endif
|
||||||
|
|
||||||
return (s.last_lit === s.lit_bufsize-1);
|
return (s.last_lit === s.lit_bufsize-1);
|
||||||
/* We avoid equality with lit_bufsize because of wraparound at 64K
|
/* We avoid equality with lit_bufsize because of wraparound at 64K
|
||||||
|
|
6
dist/pako.min.js
vendored
6
dist/pako.min.js
vendored
File diff suppressed because one or more lines are too long
44
dist/pako_deflate.js
vendored
44
dist/pako_deflate.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/* pako 0.1.0 nodeca/pako */!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.pako=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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(_dereq_,module,exports){
|
/* pako 0.1.1 nodeca/pako */!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.pako=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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(_dereq_,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
|
@ -1169,8 +1169,7 @@ function deflate_slow(s, flush) {
|
||||||
|
|
||||||
/***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
|
/***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
|
||||||
s.prev_length - MIN_MATCH, bflush);***/
|
s.prev_length - MIN_MATCH, bflush);***/
|
||||||
bflush = trees._tr_tally(s, s.strstart - 1- s.match_start, s.prev_length - MIN_MATCH);
|
bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH);
|
||||||
|
|
||||||
/* Insert in hash table all strings up to the end of the match.
|
/* Insert in hash table all strings up to the end of the match.
|
||||||
* strstart-1 and strstart are already inserted. If there is not
|
* strstart-1 and strstart are already inserted. If there is not
|
||||||
* enough lookahead, the last two strings are not inserted in
|
* enough lookahead, the last two strings are not inserted in
|
||||||
|
@ -3154,7 +3153,7 @@ function _tr_tally(s, dist, lc)
|
||||||
// unsigned dist; /* distance of matched string */
|
// unsigned dist; /* distance of matched string */
|
||||||
// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
|
// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
|
||||||
{
|
{
|
||||||
var out_length, in_length, dcode;
|
//var out_length, in_length, dcode;
|
||||||
|
|
||||||
s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;
|
s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;
|
||||||
s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;
|
s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;
|
||||||
|
@ -3177,23 +3176,28 @@ function _tr_tally(s, dist, lc)
|
||||||
s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
|
s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to guess if it is profitable to stop the current block here */
|
// (!) This block is disabled in zlib defailts,
|
||||||
if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
|
// don't enable it for binary compatibility
|
||||||
/* Compute an upper bound for the compressed length */
|
|
||||||
out_length = s.last_lit*8;
|
|
||||||
in_length = s.strstart - s.block_start;
|
|
||||||
|
|
||||||
for (dcode = 0; dcode < D_CODES; dcode++) {
|
//#ifdef TRUNCATE_BLOCK
|
||||||
out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
|
// /* Try to guess if it is profitable to stop the current block here */
|
||||||
}
|
// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
|
||||||
out_length >>>= 3;
|
// /* Compute an upper bound for the compressed length */
|
||||||
//Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
|
// out_length = s.last_lit*8;
|
||||||
// s->last_lit, in_length, out_length,
|
// in_length = s.strstart - s.block_start;
|
||||||
// 100L - out_length*100L/in_length));
|
//
|
||||||
if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
|
// for (dcode = 0; dcode < D_CODES; dcode++) {
|
||||||
return true;
|
// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
|
||||||
}
|
// }
|
||||||
}
|
// out_length >>>= 3;
|
||||||
|
// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
|
||||||
|
// // s->last_lit, in_length, out_length,
|
||||||
|
// // 100L - out_length*100L/in_length));
|
||||||
|
// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//#endif
|
||||||
|
|
||||||
return (s.last_lit === s.lit_bufsize-1);
|
return (s.last_lit === s.lit_bufsize-1);
|
||||||
/* We avoid equality with lit_bufsize because of wraparound at 64K
|
/* We avoid equality with lit_bufsize because of wraparound at 64K
|
||||||
|
|
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
8
dist/pako_inflate.js
vendored
8
dist/pako_inflate.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/* pako 0.1.0 nodeca/pako */!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.pako=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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(_dereq_,module,exports){
|
/* pako 0.1.1 nodeca/pako */!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.pako=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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(_dereq_,module,exports){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
|
@ -609,6 +609,10 @@ module.exports = function inflate_fast(strm, start) {
|
||||||
state.mode = BAD;
|
state.mode = BAD;
|
||||||
break top;
|
break top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// (!) This block is disabled in zlib defailts,
|
||||||
|
// don't enable it for binary compatibility
|
||||||
|
|
||||||
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
|
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
|
||||||
// if (len <= op - whave) {
|
// if (len <= op - whave) {
|
||||||
// do {
|
// do {
|
||||||
|
@ -900,7 +904,7 @@ function InflateState() {
|
||||||
//unsigned short array
|
//unsigned short array
|
||||||
//todo: test later with Uint16Array
|
//todo: test later with Uint16Array
|
||||||
this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
|
this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
|
||||||
this.work = new utils.Buf16(280); /* work area for code table building */
|
this.work = new utils.Buf16(288); /* work area for code table building */
|
||||||
|
|
||||||
// TODO: 8 or 16 bits?
|
// TODO: 8 or 16 bits?
|
||||||
this.codes = new utils.Buf32(ENOUGH); /* space for code tables */
|
this.codes = new utils.Buf32(ENOUGH); /* space for code tables */
|
||||||
|
|
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