# Vendored Zstandard decoder

`fzstd.js` is [fzstd](https://github.com/101arrowz/fzstd) 0.1.1 by Arjun Barrett, distributed under the MIT license preserved in `LICENSE-fzstd.txt`.

- Package: `fzstd@0.1.1`
- Archive: https://registry.npmjs.org/fzstd/-/fzstd-0.1.1.tgz
- Archive integrity: `sha512-dkuVSOKKwh3eas5VkJy1AW1vFpet8TA/fGmVA5krThl8YcOVE/8ZIoEA1+U1vEn5ckxxhLirSdY837azmbaNHA==`
- Generated JavaScript SHA-256: `88f6ec7804aaf6d54e3d2fcce9cc99950a584aedef563de064986091edb1d59d`

Regenerate with `node scripts/vendor-zstd.js` or `node scripts/vendor-zstd.js --archive PATH`. The generator verifies the exact archive, extracts source without evaluating downloaded JavaScript, and wraps the readable CommonJS implementation for classic browser scripts. No npm installation or bundler is required.

Local hardening adds bounds on literal sizes, sequence expansion, valid sequence symbols and backwards match distances before inner copy loops. The application must call `TrackerCompression.decompress` from `compression.js`, which preflights frame/window/block sizes before decoder allocation, rejects nonzero dictionary IDs, verifies declared frame lengths and optional checksums, and enforces a cumulative output cap across concatenated frames. Direct upstream decoder exports do not enforce these application limits.
