Struct zstd_seekable::CStream
source · pub struct CStream { /* private fields */ }Expand description
The type of compressors.
Implementations§
source§impl CStream
impl CStream
pub fn new(level: usize) -> Result<Self, Error>
pub fn in_size() -> usize
pub fn out_size() -> usize
sourcepub fn compress(
&mut self,
output: &mut [u8],
input: &[u8]
) -> Result<(usize, usize, usize), Error>
pub fn compress( &mut self, output: &mut [u8], input: &[u8] ) -> Result<(usize, usize, usize), Error>
Compress one chunk of input, and write it into the output. The output array must be large enough to hold the result. If successful, this function returns three integers (out_pos, in_pos, next_read_size), where out_pos is the number of bytes written in output, in_pos is the number of input bytes consumed, and next_read_size is a hint for the next read size.