Expand description
Heuristic compression primitives for AINL hosts.
This crate currently exposes the ArmaraOS “Ultra Cost-Efficient Mode” input compressor. It is intentionally embedding-free and dependency-light so it can be reused across hosts without shipping local ML models.
Set RUST_LOG=ainl_compression=debug to enable full before/after text
logging per call (useful for tuning preserve lists and retention ratios).
Structs§
- Compressed
- Result of a compression pass.
- Compression
Metrics - Structured telemetry emitted for each compression operation.
- Prompt
Compressor - Standalone input prompt compressor.
Enums§
- Efficient
Mode - Input compression aggressiveness.
Traits§
- Compression
Telemetry Sink - Optional telemetry sink for compression metrics.
Functions§
- compress
- Compress
texttowardmode.retain()of its original token budget. - compress_
with_ metrics - Compress and return structured telemetry metrics in one call.
- estimate_
semantic_ preservation_ score - Lightweight lexical semantic-preservation heuristic in range 0.0..1.0.