Skip to main content

Module compress

Module compress 

Source
Expand description

Content-type-aware compression pipeline.

The top-level compress function selects the right strategy based on ContentType and enforces an optional token budget.

Use compress_with and CompressOptions to enable advanced modes such as AST-based body stubbing (ast: true) or semantic near-duplicate deduplication (smart: true).

Structs§

CompressOptions
Options controlling the compression pipeline.

Functions§

compress
Compress input using the strategy appropriate for content_type.
compress_with
Compress input with full control over compression options.