zstd::bulk

Function compress

Source
pub fn compress(data: &[u8], level: i32) -> Result<Vec<u8>>
Expand description

Compresses a block of data and returns the compressed result.

A level of 0 uses zstd’s default (currently 3).