Function zstd::encode_all

pub fn encode_all<R>(source: R, level: i32) -> Result<Vec<u8>, Error>
where R: Read,
Expand description

Compress all data from the given source as if using an Encoder.

Result will be in the zstd frame format.

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