Compression Engines
Was this page helpful?
Loading OmniRoute...
or ) or a deterministic stacked pipeline that executes multiple engines in order.
. Engines expose a shared contract:
or
- : dashboard-readable name
- : whether the engine can execute a compression mode
- : transforms text/messages and returns stats
registers the built-in engines before compression runs. This lets preview, runtime compression, stacked mode, tests, and future engines use the same execution path.
, and modes.
fewer output tokens, average output savings in benchmarks
with a range, and a input-compression tool. OmniRoute uses the Caveman input-side
number when documenting stacked prompt/context savings; Caveman output mode remains a separate
response-behavior feature.
, , Vitest/Jest/Pytest,
Cargo/Go tests, TypeScript/Vite/Webpack builds, ESLint, npm audit/installs, Docker logs,
shell /, stack traces, and generic logs
-
- and global filters in
-
-
-
.
.
savings for command-output compression. Its README example shows a
30-minute Claude Code session going from tokens to , or saved.
rtk -> caveman
in compression settings or through compression combos.
combined = 1 - (1 - RTK savings) * (1 - Caveman input savings) average = 1 - (1 - 0.80) * (1 - 0.46) = 89.2% range = 1 - (1 - 0.60..0.90) * (1 - 0.46) = 78.4-94.6%
.
node --import tsx/esm --test tests/unit/compression/rtk-*.test.ts tests/unit/compression/pipeline-integration.test.ts tests/unit/compression/context-compression-api.test.ts node --import tsx/esm --test tests/unit/compression/*.test.ts tests/golden-set/*.test.ts tests/integration/compression-pipeline.test.ts tests/unit/api/compression/compression-api.test.ts npm run typecheck:core