Skip to main content

compress

Function compress 

Source
pub fn compress(raw: &[u8], codec: Codec) -> Result<Vec<u8>>
Expand description

Compress raw with codec (body only, no outer header).

ยงErrors

Error::ZstdNotCompiled on Codec::Zstd when utz_encode was built without the zstd feature; Error::Compress/Error::Xz if the underlying compressor fails (not expected when writing to memory).