pub fn compress<C: WriteBuf + ?Sized>(
dst: &mut C,
src: &[u8],
compression_level: CompressionLevel
) -> SafeResult
Expand description
Wraps the ZSTD_compress
function.
This will try to compress src
entirely and write the result to dst
, returning the number of
bytes written.
For streaming operations that don’t require to store the entire input/ouput in memory, see
compress_stream
.