mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-05-04 10:33:48 +01:00
More formal zlib attribution and related changes
This commit is contained in:
parent
6fd7dd729d
commit
eaead04de3
16 changed files with 280 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
1.0.5 / 2017-03-17
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Maintenance. More formal `zlib` attribution and related
|
||||||
|
changes, #93. Thanks to @bastien-roucaries for the help.
|
||||||
|
|
||||||
|
|
||||||
1.0.4 / 2016-12-15
|
1.0.4 / 2016-12-15
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
|
|
||||||
Copyright (C) 2014-2016 by Vitaly Puzrin
|
Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -9,7 +9,7 @@ __Why pako is cool:__
|
||||||
- Almost as fast in modern JS engines as C implementation (see benchmarks).
|
- Almost as fast in modern JS engines as C implementation (see benchmarks).
|
||||||
- Works in browsers, you can browserify any separate component.
|
- Works in browsers, you can browserify any separate component.
|
||||||
- Chunking support for big blobs.
|
- Chunking support for big blobs.
|
||||||
- Results are binary equal to well known [zlib](http://www.zlib.net/) (now v1.2.8 ported).
|
- Results are binary equal to well known [zlib](http://www.zlib.net/) (now contains ported zlib v1.2.8).
|
||||||
|
|
||||||
This project was done to understand how fast JS can be and is it necessary to
|
This project was done to understand how fast JS can be and is it necessary to
|
||||||
develop native C modules for CPU-intensive tasks. Enjoy the result!
|
develop native C modules for CPU-intensive tasks. Enjoy the result!
|
||||||
|
@ -169,6 +169,10 @@ Personal thanks to:
|
||||||
- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with
|
- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with
|
||||||
testing.
|
testing.
|
||||||
|
|
||||||
|
Original implementation (in C):
|
||||||
|
|
||||||
|
- [zlib](http://zlib.net/) by Jean-loup Gailly and Mark Adler.
|
||||||
|
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
59
lib/zlib/README
Normal file
59
lib/zlib/README
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
Content of this folder follows zlib C sources as close as possible.
|
||||||
|
That's indended to simplify maintainability and guarantee equal API
|
||||||
|
and result.
|
||||||
|
|
||||||
|
Key differences:
|
||||||
|
|
||||||
|
- Everything is in Javascript.
|
||||||
|
- No platform-dependent blocks.
|
||||||
|
- Some things like crc32 rewritten to keep size small and make JIT
|
||||||
|
work better.
|
||||||
|
- Some code is different due missed features in JS (macros, pointers,
|
||||||
|
structures, header files)
|
||||||
|
- Specific API methods are not implemented (see notes in root readme)
|
||||||
|
|
||||||
|
This port is based on zlib 1.2.8.
|
||||||
|
|
||||||
|
This port is under zlib license (see below) with contribution and addition of javascript
|
||||||
|
port under expat license (see LICENSE at root of project)
|
||||||
|
|
||||||
|
Copyright:
|
||||||
|
(C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
(C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
|
||||||
|
|
||||||
|
From zlib's README
|
||||||
|
=============================================================================
|
||||||
|
|
||||||
|
Acknowledgments:
|
||||||
|
|
||||||
|
The deflate format used by zlib was defined by Phil Katz. The deflate and
|
||||||
|
zlib specifications were written by L. Peter Deutsch. Thanks to all the
|
||||||
|
people who reported problems and suggested various improvements in zlib; they
|
||||||
|
are too numerous to cite here.
|
||||||
|
|
||||||
|
Copyright notice:
|
||||||
|
|
||||||
|
(C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
|
||||||
|
Copyright (c) <''year''> <''copyright holders''>
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
|
|
||||||
|
Jean-loup Gailly Mark Adler
|
||||||
|
jloup@gzip.org madler@alumni.caltech.edu
|
|
@ -4,6 +4,25 @@
|
||||||
// It doesn't worth to make additional optimizationa as in original.
|
// It doesn't worth to make additional optimizationa as in original.
|
||||||
// Small size is preferable.
|
// Small size is preferable.
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
function adler32(adler, buf, len, pos) {
|
function adler32(adler, buf, len, pos) {
|
||||||
var s1 = (adler & 0xffff) |0,
|
var s1 = (adler & 0xffff) |0,
|
||||||
s2 = ((adler >>> 16) & 0xffff) |0,
|
s2 = ((adler >>> 16) & 0xffff) |0,
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,24 @@
|
||||||
// So write code to minimize size - no pregenerated tables
|
// So write code to minimize size - no pregenerated tables
|
||||||
// and array tools dependencies.
|
// and array tools dependencies.
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
// Use ordinary array, since untyped makes no boost here
|
// Use ordinary array, since untyped makes no boost here
|
||||||
function makeTable() {
|
function makeTable() {
|
||||||
|
|
|
@ -1,5 +1,24 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
var utils = require('../utils/common');
|
var utils = require('../utils/common');
|
||||||
var trees = require('./trees');
|
var trees = require('./trees');
|
||||||
var adler32 = require('./adler32');
|
var adler32 = require('./adler32');
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
function GZheader() {
|
function GZheader() {
|
||||||
/* true if compressed data believed to be text */
|
/* true if compressed data believed to be text */
|
||||||
|
|
|
@ -1,5 +1,24 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
// See state defs from inflate.js
|
// See state defs from inflate.js
|
||||||
var BAD = 30; /* got a data error -- remain here until reset */
|
var BAD = 30; /* got a data error -- remain here until reset */
|
||||||
var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
|
var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
var utils = require('../utils/common');
|
var utils = require('../utils/common');
|
||||||
var adler32 = require('./adler32');
|
var adler32 = require('./adler32');
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
var utils = require('../utils/common');
|
var utils = require('../utils/common');
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,24 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
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 */
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
var utils = require('../utils/common');
|
var utils = require('../utils/common');
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
function ZStream() {
|
function ZStream() {
|
||||||
/* next input byte */
|
/* next input byte */
|
||||||
|
|
|
@ -11,14 +11,18 @@
|
||||||
"homepage": "https://github.com/nodeca/pako",
|
"homepage": "https://github.com/nodeca/pako",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Andrei Tuputcyn (https://github.com/andr83)",
|
"Andrei Tuputcyn (https://github.com/andr83)",
|
||||||
"Vitaly Puzrin (https://github.com/puzrin)"
|
"Vitaly Puzrin (https://github.com/puzrin)",
|
||||||
|
"Friedel Ziegelmayer (https://github.com/dignifiedquire)",
|
||||||
|
"Kirill Efimov (https://github.com/Kirill89)",
|
||||||
|
"Jean-loup Gailly",
|
||||||
|
"Mark Adler"
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"dist/",
|
"dist/",
|
||||||
"lib/"
|
"lib/"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "(MIT AND ZLIB)",
|
||||||
"repository": "nodeca/pako",
|
"repository": "nodeca/pako",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ansi": "*",
|
"ansi": "*",
|
||||||
|
|
Loading…
Add table
Reference in a new issue