From f2bcd09d954d0feea2cfc2ec352f161e0addfb6f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 3 Sep 2017 23:42:18 -0400 Subject: [PATCH] Spelling (#114) --- CHANGELOG.md | 2 +- README.md | 2 +- bower.json | 2 +- lib/deflate.js | 6 +++--- lib/inflate.js | 8 ++++---- lib/utils/strings.js | 4 ++-- lib/zlib/README | 4 ++-- lib/zlib/adler32.js | 2 +- lib/zlib/inffast.js | 2 +- lib/zlib/inflate.js | 6 +++--- lib/zlib/trees.js | 4 ++-- test/deflate.js | 2 +- test/helpers.js | 2 +- test/inflate.js | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce636b6..61da696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index e4560ec..c58572a 100644 --- a/README.md +++ b/README.md @@ -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:__ diff --git a/bower.json b/bower.json index f7d6444..fea3c55 100644 --- a/bower.json +++ b/bower.json @@ -6,7 +6,7 @@ "Andrei Tuputcyn ", "Vitaly Puzrin " ], - "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": [ diff --git a/lib/deflate.js b/lib/deflate.js index de7efc0..efeb00c 100644 --- a/lib/deflate.js +++ b/lib/deflate.js @@ -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. * diff --git a/lib/inflate.js b/lib/inflate.js index 9b34159..4028130 100644 --- a/lib/inflate.js +++ b/lib/inflate.js @@ -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); diff --git a/lib/utils/strings.js b/lib/utils/strings.js index 982e608..313c27b 100644 --- a/lib/utils/strings.js +++ b/lib/utils/strings.js @@ -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; } diff --git a/lib/zlib/README b/lib/zlib/README index 693179d..88a8752 100644 --- a/lib/zlib/README +++ b/lib/zlib/README @@ -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. diff --git a/lib/zlib/adler32.js b/lib/zlib/adler32.js index 7203dc1..d440a98 100644 --- a/lib/zlib/adler32.js +++ b/lib/zlib/adler32.js @@ -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 diff --git a/lib/zlib/inffast.js b/lib/zlib/inffast.js index 1ecfbb9..4cc958f 100644 --- a/lib/zlib/inffast.js +++ b/lib/zlib/inffast.js @@ -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) { diff --git a/lib/zlib/inflate.js b/lib/zlib/inflate.js index 0a242ce..6384844 100644 --- a/lib/zlib/inflate.js +++ b/lib/zlib/inflate.js @@ -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; } diff --git a/lib/zlib/trees.js b/lib/zlib/trees.js index 2fa0f00..2a81992 100644 --- a/lib/zlib/trees.js +++ b/lib/zlib/trees.js @@ -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 diff --git a/test/deflate.js b/test/deflate.js index 3a69660..73594a8 100644 --- a/test/deflate.js +++ b/test/deflate.js @@ -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 }); }); diff --git a/test/helpers.js b/test/helpers.js index 6e2e7dc..d64d197 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -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]; diff --git a/test/inflate.js b/test/inflate.js index 1963916..83f92f7 100644 --- a/test/inflate.js +++ b/test/inflate.js @@ -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 }); });