pub struct SmartCompressor { /* private fields */ }Expand description
Smart compressor with automatic type-based strategy selection
Implementations§
Trait Implementations§
Source§impl Clone for SmartCompressor
impl Clone for SmartCompressor
Source§impl Compressor for SmartCompressor
impl Compressor for SmartCompressor
Source§impl Debug for SmartCompressor
impl Debug for SmartCompressor
Source§impl Default for SmartCompressor
impl Default for SmartCompressor
Source§impl TypeAwareCompressor for SmartCompressor
impl TypeAwareCompressor for SmartCompressor
Source§fn compress_typed(
&self,
data: &[u8],
obj_type: ObjectType,
) -> CompressionResult<Vec<u8>>
fn compress_typed( &self, data: &[u8], obj_type: ObjectType, ) -> CompressionResult<Vec<u8>>
Compress with automatic strategy selection
Source§fn compress_typed_with_size(
&self,
data: &[u8],
obj_type: ObjectType,
) -> CompressionResult<Vec<u8>>
fn compress_typed_with_size( &self, data: &[u8], obj_type: ObjectType, ) -> CompressionResult<Vec<u8>>
Compress with automatic strategy selection considering data size
For large text files (>500MB), uses Zstd instead of Brotli for faster compression
Source§fn decompress_typed(&self, data: &[u8]) -> CompressionResult<Vec<u8>>
fn decompress_typed(&self, data: &[u8]) -> CompressionResult<Vec<u8>>
Decompress data (auto-detects algorithm)
Source§fn strategy_for_type(&self, obj_type: ObjectType) -> CompressionStrategy
fn strategy_for_type(&self, obj_type: ObjectType) -> CompressionStrategy
Get compression strategy for object type
Source§fn strategy_for_type_with_size(
&self,
obj_type: ObjectType,
data_size: usize,
) -> CompressionStrategy
fn strategy_for_type_with_size( &self, obj_type: ObjectType, data_size: usize, ) -> CompressionStrategy
Get compression strategy for object type with size consideration
Auto Trait Implementations§
impl Forget for SmartCompressor
impl Freeze for SmartCompressor
impl RefUnwindSafe for SmartCompressor
impl Send for SmartCompressor
impl Sync for SmartCompressor
impl Unpin for SmartCompressor
impl UnsafeUnpin for SmartCompressor
impl UnwindSafe for SmartCompressor
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