Skip to main content

Module compression

Module compression 

Source

Enums§

CompressionKind

Functions§

compress
Compresses data using the specified compression algorithm
decompress
Decompresses data that was compressed with the specified algorithm
maybe_compress
Compress data if it meets the configured threshold, otherwise return it unchanged. Returns the output bytes and a flag indicating whether compression was applied.
maybe_compress_adaptive
Adaptive compression using entropy analysis to avoid compressing high-entropy data Provides 10-15% CPU reduction for mixed workloads by skipping compression of incompressible data (encrypted, already compressed, or random data)
maybe_decompress
Decompress data only if it was previously compressed; otherwise return as-is.