pub fn compress( buf: &[u8], format: Format, level: CompressionLevel, ) -> Result<Vec<u8>, Error>
Compresses a buffer into a vector with the specified format and compression level.