pub struct CompressionCodec { /* private fields */ }Expand description
Compression codec
Implementations§
Source§impl CompressionCodec
impl CompressionCodec
Sourcepub fn new(compression_type: CompressionType, level: CompressionLevel) -> Self
pub fn new(compression_type: CompressionType, level: CompressionLevel) -> Self
Create a new compression codec
Sourcepub fn decompress(&self, data: &[u8]) -> Result<Bytes>
pub fn decompress(&self, data: &[u8]) -> Result<Bytes>
Decompress data
Sourcepub fn compression_type(&self) -> CompressionType
pub fn compression_type(&self) -> CompressionType
Get compression type
Sourcepub fn level(&self) -> CompressionLevel
pub fn level(&self) -> CompressionLevel
Get compression level
Auto Trait Implementations§
impl Freeze for CompressionCodec
impl RefUnwindSafe for CompressionCodec
impl Send for CompressionCodec
impl Sync for CompressionCodec
impl Unpin for CompressionCodec
impl UnsafeUnpin for CompressionCodec
impl UnwindSafe for CompressionCodec
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