Skip to main content

compress_prose

Function compress_prose 

Source
pub fn compress_prose(text: &str, aggressiveness: f64) -> Option<String>
Expand description

Compress a single prose string at aggressiveness (0.0–1.0).

Returns Some(compressed) only when the text is long enough, looks like prose, and the squeeze actually saves tokens; otherwise None (leave the original intact — the anti-inflation guard). Deterministic: the result is a pure function of (text, aggressiveness).