Releases: initializ/ctxzip
Release list
v0.1.0 — reversible context compression engine
First release of ctxzip — reversible context compression for AI agents. Lossy on the wire, lossless end-to-end: every chunk dropped is hashed, stored locally, and replaced by an inline <<ctxzip:HASH ...>> marker the model can expand on demand.
Highlights
- Content-aware crushers —
JSONCrusher(row selection + dedup),LogCrusher(line selection),TextCrusher(line-mode numeric-insensitive dedup for grep/log output; extractive BM25 sentence selection for prose — verbatim only, never paraphrased) - CCR reversibility —
ccr.Storeinterface with in-memory and durable bbolt backends; originals survive restarts; 12-hex content-addressed markers (short enough that LLMs transcribe them reliably); marker hash == store key by construction - Fidelity floor — errors/anomalies/query anchors never dropped; built-in error vocabulary includes k8s state words (
crash,backoff,oomkilled,evicted); callers extend it viaOptions.MustKeep(union semantics — can only add protection) - Prompt-cache discipline — frozen prefix + protected recent turns forwarded byte-identical; fully deterministic output;
Options.SkipNamesexempts a host's expansion tool from re-compression - Pure Go — single third-party dependency (bbolt); no cgo, no ML runtime
cmd/ctxzip-demo— pipe any file/output through and watch the compress → store → retrieve round trip
Field-tested
Built and hardened against a live forge agent: 5.6 KB grep output compressed 1,397 → 51 tokens (96%) with the one crashing pod kept verbatim, full original retrievable by marker hash. Several v0.1.0 behaviors (line-mode splitting, stop-term filtering, 12-hex hashes, SkipNames) exist because live testing found the failure modes.
Use
go get github.com/initializ/ctxzip@v0.1.0See the README for the full options reference and the three-seam runtime embedding guide.
Compatibility: v0.x — the API may change between minor versions while live-driven hardening continues.