pub trait Compression {
// Required methods
fn compress_bound(origin_len: usize) -> usize;
fn compress(src: &[u8], dest: &mut [u8]) -> Result<usize>;
fn decompress(src: &[u8], dest: &mut [u8]) -> Result<usize>;
}
Expand description
A trait for different compress method
Required Methods§
Sourcefn compress_bound(origin_len: usize) -> usize
fn compress_bound(origin_len: usize) -> usize
Estimate the upper bound of buffer size needed
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.