pub struct AdvancedCompressor { /* private fields */ }Expand description
Advanced compressor with multiple algorithm support
Implementations§
Source§impl AdvancedCompressor
impl AdvancedCompressor
Sourcepub fn with_config(config: CompressionConfig) -> Self
pub fn with_config(config: CompressionConfig) -> Self
Create compressor with custom config
Sourcepub fn compress_resource(
&self,
resource: &Resource,
) -> Result<CompressionResult>
pub fn compress_resource( &self, resource: &Resource, ) -> Result<CompressionResult>
Compress a resource
Sourcepub fn compress_data(
&self,
data: &[u8],
algorithm: CompressionAlgorithm,
level: CompressionLevel,
) -> Result<CompressionResult>
pub fn compress_data( &self, data: &[u8], algorithm: CompressionAlgorithm, level: CompressionLevel, ) -> Result<CompressionResult>
Compress raw data with specific algorithm and level
Sourcepub fn decompress_data(
&self,
compressed_data: &[u8],
algorithm: CompressionAlgorithm,
) -> Result<DecompressionResult>
pub fn decompress_data( &self, compressed_data: &[u8], algorithm: CompressionAlgorithm, ) -> Result<DecompressionResult>
Decompress data
Sourcepub fn benchmark_algorithms(
&self,
data: &[u8],
) -> Result<Vec<CompressionResult>>
pub fn benchmark_algorithms( &self, data: &[u8], ) -> Result<Vec<CompressionResult>>
Benchmark compression algorithms for given data
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AdvancedCompressor
impl RefUnwindSafe for AdvancedCompressor
impl Send for AdvancedCompressor
impl Sync for AdvancedCompressor
impl Unpin for AdvancedCompressor
impl UnsafeUnpin for AdvancedCompressor
impl UnwindSafe for AdvancedCompressor
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more