Struct zstd::block::Decompressor
[−]
[src]
pub struct Decompressor { // some fields omitted }
Allows to decompress multiple blocks of data, re-using the context.
Methods
impl Decompressor
[src]
fn new() -> Self
Creates a new zstd decompressor.
fn with_dict(dict: Vec<u8>) -> Self
Creates a new zstd decompressor, using the given dictionary.
fn decompress_to_buffer(&mut self, destination: &mut [u8], source: &[u8]) -> Result<usize>
Deompress a single block of data to the given destination buffer.
Returns the number of bytes written, or an error if something happened (for instance if the destination buffer was too small).
fn decompress(&mut self, data: &[u8], capacity: usize) -> Result<Vec<u8>>
Decompress a block of data, and return the decompressed result in a Vec<u8>
.
The decompressed data should be less than capacity
bytes,
or an error will be returned.
Trait Implementations
impl Default for Decompressor
[src]
fn default() -> Decompressor
Returns the "default value" for a type. Read more