Claw Compactor
What it is
Claw Compactor is a Python library for LLM token compression that uses a 14-stage fusion pipeline to reduce context size without LLM inference costs. It employs specialized stages for AST-aware code analysis, JSON sampling, and semantic deduplication to achieve reversible compression.
The problem it solves
High cost and latency associated with sending large, unoptimized context windows to LLMs, particularly for code and structured data where standard compression methods fail.
What you could use it for
- Reducing API costs for LLM applications by compressing context windows
- Optimizing token usage for code-heavy prompts using AST analysis
- Compressing logs and diffs for efficient LLM processing
Read the source ↗Back to the library →
Summary written by an AI model from the source; check the source before you rely on it.