Packages

@tootallnate/zstd-wasm

0.1.0 · 16 Jun 2026MIT25.1k / weekRepositoryHomepagenpmAtom feed

Your version

0.0.2

14 Jun 2026Where it was published

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 streaming TransformStream API.

    @tootallnate/zstd-wasm wraps a build of upstream zstd's
    single-file decoder (compiled with wasi-sdk, no WASI imports) in a
    small TypeScript shim. Exports:

    • ZstdDecompressStream — a TransformStream<Uint8Array, Uint8Array>
      subclass mirroring the platform's DecompressionStream shape.
      Compose with compressed.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-compiled WebAssembly.Module). The module is published with no
    fetch / fs assumptions 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.