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:

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.

Original post →

More from coding & agent

coding & agent channel →