unzstd: Decompress .zst Cache Files in CI
unzstd decompresses .zst files and is equivalent to zstd -d, restoring the original by stripping the .zst suffix.
unzstd is the restore side of a zstd build cache. It keeps the source by default and streams cleanly into tar.
What it does
unzstd reads a .zst file and decompresses the Zstandard stream, writing the original name without the suffix and keeping the compressed file by default. It is the same binary as zstd in decompress mode.
Common usage
unzstd deps.tar.zst # -> deps.tar
unzstd -c cache.zst | tar -x # stream into tar
unzstd --long=31 big.tar.zst # allow a large window
unzstd -o out.bin data.zst # explicit output pathOptions
| Flag | What it does |
|---|---|
| -c / --stdout | Write to stdout |
| -k / --keep | Keep the .zst file (default for zstd) |
| --long[=<n>] | Set the window log to decode --long files |
| -o <file> | Explicit output path |
| -f / --force | Overwrite existing output |
| -t / --test | Test integrity only |
Common errors in CI
"zstd: /*stdin*\\: unsupported format" means the input is not zstd. "Frame requires too much memory for decoding" means the file used a large --long window; re-run with --long=31. "command not found" means the zstd package is not installed. A truncated cache download shows "Read error" or "Src size incorrect".