pub struct Compressor;Expand description
High-level compressor: tries every algorithm and picks the smallest result.
Implementations§
Source§impl Compressor
impl Compressor
Sourcepub fn compress_auto(data: &[u8]) -> CompressedBlock
pub fn compress_auto(data: &[u8]) -> CompressedBlock
Compress data using each available algorithm, return the smallest CompressedBlock.
Sourcepub fn compress_with(data: &[u8], algo: CompressionAlgorithm) -> CompressedBlock
pub fn compress_with(data: &[u8], algo: CompressionAlgorithm) -> CompressedBlock
Compress with a specific algorithm.
Auto Trait Implementations§
impl Freeze for Compressor
impl RefUnwindSafe for Compressor
impl Send for Compressor
impl Sync for Compressor
impl Unpin for Compressor
impl UnsafeUnpin for Compressor
impl UnwindSafe for Compressor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more