compress

Function compress 

Source
pub fn compress(
    data: &[u8],
    algorithm: CompressionAlgorithm,
    threshold: usize,
) -> Result<Vec<u8>>
Expand description

Compresses data using the specified algorithm. Returns compressed data with 1-byte header: [algorithm_id][compressed_data] Returns original data with header [0][original_data] if compression is disabled or ineffective.