4 ms·
Fun Fact: a person https://github.com/101arrowz https://github.com/101arrowz recently created a ZSTD decompressor in Javascript (without any dependencies), whi
by IvanK_net 5y ago
Fun Fact: a person https://github.com/101arrowz https://github.com/101arrowz recently created a ZSTD decompressor in Javascript (without any dependencies), which is only 7.1 kB (3.6 kB zipped) - here it is: https://unpkg.com/fzstd@0.0.2/umd/index.js https://unpkg.com/fzstd@0.0.2/umd/index.js (and it is quite fast, too).
- pimterry 5y agoThanks! This looks really useful. I've been using https://www.npmjs.com/package/zstd-codec https://www.npmjs.com/package/zstd-codec which simply compiles the official implementation to WASM and wraps it up for JS use. It does include the compressor too, but the end result is quite dramatically larger (3MB unzipped).
- IvanK_net 5y agoYou can compile only the decompressor of the official ZSTD library to wasm, it is ony 28 kB: https://github.com/facebook/zstd/files/6602821/zstd.zip https://github.com/facebook/zstd/files/6602821/zstd.zip