Skip to content

Commit 10b2345

Browse files
authored
Merge pull request #7 from stefnotch/patch-1
Make data happier
2 parents 8e990d3 + 827144c commit 10b2345

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In node.js:
3131
const * as brotli = require('brotli-wasm');
3232

3333
const compressedData = brotli.compress(Buffer.from('some input'));
34-
const depressedData = brotli.decompress(compressedData);
34+
const decompressedData = brotli.decompress(compressedData);
3535

3636
console.log(Buffer.from(decompressedData).toString('utf8')); // Prints 'some input'
3737
```
@@ -44,7 +44,7 @@ import * as brotliPromise from 'brotli-wasm';
4444
const brotli = await brotliPromise; // Import is async in browsers due to wasm requirements!
4545

4646
const compressedData = brotli.compress(Buffer.from('some input'));
47-
const depressedData = brotli.decompress(compressedData);
47+
const decompressedData = brotli.decompress(compressedData);
4848

4949
console.log(Buffer.from(decompressedData).toString('utf8')); // Prints 'some input'
5050
```
@@ -59,4 +59,4 @@ There's a few other packages that do similar things, but I found they were all u
5959

6060
* [brotli-dec-wasm](https://www.npmjs.com/package/brotli-dec-wasm) - decompressor only, compiled from Rust just like this package, actively maintained, but no compressor available (by design). **If you only need decompression, this package is a good choice**.
6161
* [Brotli.js](https://www.npmjs.com/package/brotli) - hand-written JS decompressor that seems to work OK for most cases, but it crashes for some edge cases and the emscripten build of the compressor doesn't work in browsers at all. Last updated in 2017.
62-
* [wasm-brotli](https://www.npmjs.com/package/wasm-brotli) - Compiled from Rust like this package, includes decompressor & compressor, but requires a custom async wrapper for Webpack v4 usage and isn't usable at all in Webpack v5. Last updated in 2019.
62+
* [wasm-brotli](https://www.npmjs.com/package/wasm-brotli) - Compiled from Rust like this package, includes decompressor & compressor, but requires a custom async wrapper for Webpack v4 usage and isn't usable at all in Webpack v5. Last updated in 2019.

0 commit comments

Comments
 (0)