cavs — packaging CLI
The cavs binary turns files and game builds into deduplicated, verifiable
.cavs files, inspects and verifies them, reconstructs them byte-for-byte, and
manages the global content-addressable store.
How it works
cavs pack --raw splits inputs into FastCDC chunks (~64 KiB), deduplicates
them, compresses each with zstd, and writes a .cavs container with a chunk
table, a Merkle root over the content, per-file SHA-256, and an optional
Ed25519 signature. Reconstruction (unpack) verifies every chunk and produces
the original files exactly. The video mode (without --raw) segments inputs
with ffmpeg first, then packages the segments.
With --profile auto the packer first classifies each input (format
magic, sampled entropy, a zstd probe) and measures candidate chunk
profiles on the real bytes, picking the cheapest by a weighted cost model:
already-compressed payloads get large fixed chunks, engine packs get CDC.
--bootstrap additionally writes <output>.bootstrap.zst — the whole input
compressed at zstd-19 — which the server offers to cache-less clients so a
first install costs the full artifact (and seeds the client's cache). When
packing the next version, pass --prev <published .cavs> so profile choice
stays consistent with the chunks clients already have.
Commands
# Package (game assets / arbitrary files)
# Measure candidate chunk profiles on your own builds (optionally vs the
# published previous version, to see real chunk reuse)
# Package video (needs ffmpeg on PATH)
# Inspect / verify / reconstruct
# Signing keys (Ed25519)
# Global store (dedup at rest across versions/titles)
# Manifest formats (v0.3.0)
Run cavs --help or cavs <command> --help for all options.
Requirements
Nothing extra for --raw (game asset) mode. ffmpeg/ffplay on PATH only
for the video mode.