Zstdify: A Pure TypeScrpt Zstd Re-Implementation
Pure JavaScript/TypeScript zstd compression/decompression library. No native dependencies, works in Node.js and browsers.
Zstdify: A Pure TypeScrpt Zstd Re-Implementation
Pure JavaScript/TypeScript zstd compression/decompression library. No native dependencies, works in Node.js and browsers.
@rawnsley @BenHouston3D @donmccurdy https://github.com/101arrowz/fzstd exists for decompression and runs 1.8x-2.6x faster. The compressor here is quite weak (I see results that are nowhere close to zstd level 1 ratio-wise) and runs at ~2 MB/s.
If you need a smaller decoder, take zstddec, and:
- Enable EMMALLOC during building (saves 3 KB)
- Use wasmpack (meshoptimizer/tools/wasmpack.py) instead of Base64, saves 7 KB
The result is a 20 KB (post-gzip) file for non-stream version that's still as fast.
@zeux @rawnsley @donmccurdy per our discussion I've added full benchmarks (compression ratio, decompress/compress speeds) to the README. I also did some optimization and make a new release.
https://github.com/bhouston/zstdify?tab=readme-ov-file#throughput-mbs