Densely: Lossless Context Compression for LLM Agents Saves Up to 87% Tokens
No_Advertising2536 · reddit · 2026-08-10
A developer has open-sourced densely, a lossless context compression tool for LLM agents. Instead of traditional summarization, it uses lzma compression and re-encodes the compressed bytes into 65,536 specific English words, ensuring each word costs exactly 1 token. This achieves a lossless 16 bits per token storage with sha256 verification.
Performance:
- Logs: 6.94x compression (85.6% fewer tokens)
- JSON tool outputs: 7.75x (87.1%)
- Code: 2.02x with lzma alone; up to 7.27x with an optional neural backend (e.g., Qwen2.5-Coder-0.5B)
Shipped as an MCP server (supporting Claude Code / Cursor), it auto-compresses large tool outputs and allows server-side grep searching, bringing only matched results into the context window. The author notes that the compressed payloads are unreadable to the model, making this a cold storage + targeted retrieval solution rather than a summary.
More from coding & agent
- Delphi Agent Arena Competition Opens: $10K Prize for the Best AI Forecasting Agent — benfielding · 2026-08-10
- Beyond Harnesses: Building Vertical AI Tools Remains a High-Alpha Strategy — pvncher · 2026-08-10
- AI Won't Save Front-End Yet: Developers Urged to Master Design Fundamentals — marclou · 2026-08-10
- Scale AI Releases Muse Glimmer: 30B Open-Weight Agentic Model — JesseDodge · 2026-08-10
- Flow Wrangler: Open-Source Plugin to Auto-Connect Large ComfyUI Workflows — Due-Cauliflower2669 · 2026-08-10
- Grok Build: Open-Source Extension to Manage Multiple Projects in a Single VS Code Window — PawelHuryn · 2026-08-10