This commit is contained in:
Josh Soref 2017-09-03 23:42:18 -04:00 committed by Vitaly Puzrin
parent 7abdb13eec
commit f2bcd09d95
14 changed files with 24 additions and 24 deletions

View file

@ -81,7 +81,7 @@
0.2.2 / 2014-06-04
------------------
- Fixed iOS 5.1 Safary issue with `apply(typed_array)`, #26.
- Fixed iOS 5.1 Safari issue with `apply(typed_array)`, #26.
0.2.1 / 2014-05-01

View file

@ -24,7 +24,7 @@ __Famous projects, using pako:__
- [mincer](https://github.com/nodeca/mincer)
- [JS-Git](https://github.com/creationix/js-git) and
[Tedit](https://chrome.google.com/webstore/detail/tedit-development-environ/ooekdijbnbbjdfjocaiflnjgoohnblgf)
by [@creatronix](https://github.com/creationix)
by [@creationix](https://github.com/creationix)
__Benchmarks:__

View file

@ -6,7 +6,7 @@
"Andrei Tuputcyn <Andrew.Tupitsin@gmail.com>",
"Vitaly Puzrin <vitaly@rcdesign.ru>"
],
"description": "deflate / inflate / gzip for bworser - very fast zlib port",
"description": "deflate / inflate / gzip for browser - very fast zlib port",
"keywords": ["zlib", "deflate", "inflate", "gzip"],
"license": "MIT",
"ignore": [

View file

@ -39,7 +39,7 @@ var Z_DEFLATED = 8;
/* internal
* Deflate.chunks -> Array
*
* Chunks of output data, if [[Deflate#onData]] not overriden.
* Chunks of output data, if [[Deflate#onData]] not overridden.
**/
/**
@ -192,7 +192,7 @@ function Deflate(options) {
* - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be
* converted to utf8 byte sequence.
* - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
* See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.
* See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
*
* Sends input data to deflate pipe, generating [[Deflate#onData]] calls with
* new compressed chunks. Returns `true` on success. The last data block must have
@ -281,7 +281,7 @@ Deflate.prototype.push = function (data, mode) {
/**
* Deflate#onData(chunk) -> Void
* - chunk (Uint8Array|Array|String): ouput data. Type of array depends
* - chunk (Uint8Array|Array|String): output data. Type of array depends
* on js engine support. When string output requested, each chunk
* will be string.
*

View file

@ -22,7 +22,7 @@ var toString = Object.prototype.toString;
/* internal
* inflate.chunks -> Array
*
* Chunks of output data, if [[Inflate#onData]] not overriden.
* Chunks of output data, if [[Inflate#onData]] not overridden.
**/
/**
@ -150,7 +150,7 @@ function Inflate(options) {
* Inflate#push(data[, mode]) -> Boolean
* - data (Uint8Array|Array|ArrayBuffer|String): input data
* - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
* See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.
* See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
*
* Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
* new output chunks. Returns `true` on success. The last data block must have
@ -297,7 +297,7 @@ Inflate.prototype.push = function (data, mode) {
/**
* Inflate#onData(chunk) -> Void
* - chunk (Uint8Array|Array|String): ouput data. Type of array depends
* - chunk (Uint8Array|Array|String): output data. Type of array depends
* on js engine support. When string output requested, each chunk
* will be string.
*
@ -324,7 +324,7 @@ Inflate.prototype.onEnd = function (status) {
if (status === c.Z_OK) {
if (this.options.to === 'string') {
// Glue & convert here, until we teach pako to send
// utf8 alligned strings to onData
// utf8 aligned strings to onData
this.result = this.chunks.join('');
} else {
this.result = utils.flattenChunks(this.chunks);

View file

@ -8,7 +8,7 @@ var utils = require('./common');
// Quick check if we can use fast array to bin string conversion
//
// - apply(Array) can fail on Android 2.2
// - apply(Uint8Array) can fail on iOS 5.1 Safary
// - apply(Uint8Array) can fail on iOS 5.1 Safari
//
var STR_APPLY_OK = true;
var STR_APPLY_UIA_OK = true;
@ -177,7 +177,7 @@ exports.utf8border = function (buf, max) {
// return max, because we should return something anyway.
if (pos < 0) { return max; }
// If we came to start of buffer - that means vuffer is too small,
// If we came to start of buffer - that means buffer is too small,
// return max too.
if (pos === 0) { return max; }

View file

@ -1,10 +1,10 @@
Content of this folder follows zlib C sources as close as possible.
That's indended to simplify maintainability and guarantee equal API
That's intended to simplify maintainability and guarantee equal API
and result.
Key differences:
- Everything is in Javascript.
- Everything is in JavaScript.
- No platform-dependent blocks.
- Some things like crc32 rewritten to keep size small and make JIT
work better.

View file

@ -1,7 +1,7 @@
'use strict';
// Note: adler32 takes 12% for level 0 and 2% for level 6.
// It doesn't worth to make additional optimizationa as in original.
// It isn't worth it to make additional optimizations as in original.
// Small size is preferable.
// (C) 1995-2013 Jean-loup Gailly and Mark Adler

View file

@ -201,7 +201,7 @@ module.exports = function inflate_fast(strm, start) {
break top;
}
// (!) This block is disabled in zlib defailts,
// (!) This block is disabled in zlib defaults,
// don't enable it for binary compatibility
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
// if (len <= op - whave) {

View file

@ -625,7 +625,7 @@ function inflate(strm, flush) {
if (state.head) {
len = state.head.extra_len - state.length;
if (!state.head.extra) {
// Use untyped array for more conveniend processing later
// Use untyped array for more convenient processing later
state.head.extra = new Array(state.head.extra_len);
}
utils.arraySet(
@ -1309,7 +1309,7 @@ function inflate(strm, flush) {
state.mode = BAD;
break;
}
// (!) This block is disabled in zlib defailts,
// (!) This block is disabled in zlib defaults,
// don't enable it for binary compatibility
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
// Trace((stderr, "inflate.c too far\n"));
@ -1360,7 +1360,7 @@ function inflate(strm, flush) {
while (bits < 32) {
if (have === 0) { break inf_leave; }
have--;
// Use '|' insdead of '+' to make sure that result is signed
// Use '|' instead of '+' to make sure that result is signed
hold |= input[next++] << bits;
bits += 8;
}

View file

@ -128,7 +128,7 @@ var bl_order =
var DIST_CODE_LEN = 512; /* see definition of array dist_code below */
// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1
// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1
var static_ltree = new Array((L_CODES + 2) * 2);
zero(static_ltree);
/* The static literal tree. Since the bit lengths are imposed, there is no
@ -1183,7 +1183,7 @@ function _tr_tally(s, dist, lc)
s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
}
// (!) This block is disabled in zlib defailts,
// (!) This block is disabled in zlib defaults,
// don't enable it for binary compatibility
//#ifdef TRUNCATE_BLOCK

View file

@ -161,7 +161,7 @@ describe('Deflate strategy', function () {
describe('Deflate RAW', function () {
// Since difference is only in rwapper, test for store/fast/slow methods are enougth
// Since difference is only in rwapper, test for store/fast/slow methods are enough
it('level 4', function () {
testSamples(zlib.deflateRawSync, pako.deflateRaw, samples, { level: 4 });
});

View file

@ -64,7 +64,7 @@ function testSingle(zlib_method, pako_method, data, options) {
var pako_result = pako_method(data, options);
// One more hack: gzip header contains OS code, that can vary.
// Override OS code if requested. For simplisity, we assume it on fixed
// Override OS code if requested. For simplicity, we assume it on fixed
// position (= no additional gzip headers used)
if (options.ignore_os) zlib_result[9] = pako_result[9];

View file

@ -130,7 +130,7 @@ describe('Inflate strategy', function () {
describe('Inflate RAW', function () {
// Since difference is only in rwapper, test for store/fast/slow methods are enougth
// Since difference is only in rwapper, test for store/fast/slow methods are enough
it('level 9', function () {
testInflate(samples, { raw: true }, { level: 9, raw: true });
});