pub fn compress(
data: &[u8],
config: &CompressionConfig,
) -> Result<Option<Vec<u8>>, CompressionError>Expand description
Compress data with automatic algorithm selection.
Returns the compressed data with header, or None if compression doesn’t help (compressed would be larger).