pub struct Lz4Compressor { /* private fields */ }Expand description
LZ4 compressor.
Implementations§
Source§impl Lz4Compressor
impl Lz4Compressor
Sourcepub fn new() -> Lz4Compressor
pub fn new() -> Lz4Compressor
Create a new LZ4 compressor with default settings.
Sourcepub fn with_level(level: CompressionLevel) -> Lz4Compressor
pub fn with_level(level: CompressionLevel) -> Lz4Compressor
Create a new LZ4 compressor with specified level.
Trait Implementations§
Source§impl Clone for Lz4Compressor
impl Clone for Lz4Compressor
Source§fn clone(&self) -> Lz4Compressor
fn clone(&self) -> Lz4Compressor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Compressor for Lz4Compressor
impl Compressor for Lz4Compressor
Source§fn level(&self) -> CompressionLevel
fn level(&self) -> CompressionLevel
Get the configured compression level.
Source§fn compress(&self, input: &[u8]) -> Result<Vec<u8>, Error>
fn compress(&self, input: &[u8]) -> Result<Vec<u8>, Error>
Compress data in one shot. Read more
Source§fn compress_to(&self, input: &[u8], output: &mut [u8]) -> Result<usize, Error>
fn compress_to(&self, input: &[u8], output: &mut [u8]) -> Result<usize, Error>
Compress data into existing buffer. Read more
Source§fn max_compressed_size(&self, input_len: usize) -> usize
fn max_compressed_size(&self, input_len: usize) -> usize
Calculate maximum compressed size for input length.
Useful for pre-allocating output buffers.
Source§fn stats(&self) -> Option<CompressionStats>
fn stats(&self) -> Option<CompressionStats>
Get compression statistics after operation.
Source§impl Debug for Lz4Compressor
impl Debug for Lz4Compressor
Source§impl Default for Lz4Compressor
impl Default for Lz4Compressor
Source§fn default() -> Lz4Compressor
fn default() -> Lz4Compressor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for Lz4Compressor
impl Freeze for Lz4Compressor
impl RefUnwindSafe for Lz4Compressor
impl Send for Lz4Compressor
impl Sync for Lz4Compressor
impl Unpin for Lz4Compressor
impl UnsafeUnpin for Lz4Compressor
impl UnwindSafe for Lz4Compressor
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