@tootallnate/zstd-wasm
0.1.0 · 16 Jun 2026MIT25.1k / weekRepositoryHomepagenpmAtom feed
0.1.0 is the newest release of 0.0.x.
In short
1 new
Release note
Patch Changes
New package: WebAssembly-backed Zstandard decoder for browser and
Node.js with a streamingTransformStreamAPI.@tootallnate/zstd-wasmwraps a build of upstream zstd's
single-file decoder (compiled with wasi-sdk, no WASI imports) in a
small TypeScript shim. Exports:ZstdDecompressStream— aTransformStream<Uint8Array, Uint8Array>
subclass mirroring the platform'sDecompressionStreamshape.
Compose withcompressed.pipeThrough(new ZstdDecompressStream(wasm)).ZstdDecoder— lower-level streaming decoder for callers that want
direct control over chunk feeding (push(chunk, onOutput)).decompressBytes(wasm, compressed)— one-shot helper for buffers
that comfortably fit in memory.
The caller is responsible for sourcing the WASM bytes (or a
pre-compiledWebAssembly.Module). The module is published with nofetch/fsassumptions so it works equally well in browsers,
bundlers (vite?url, webpack asset modules), Node ESM, Deno, etc.
The compiled WASM is exported at@tootallnate/zstd-wasm/zstd.wasm.This package was created to replace
fzstd, which has a known
streaming-decoder correctness bug at large input sizes
(#19) that produced
scattered byte corruption in NCZ → NCA pipelines for multi-GB games.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.