pub struct CompressionManager;Expand description
Compression manager for HLXB format
Implementations§
Source§impl CompressionManager
impl CompressionManager
Sourcepub fn compress(
data: &[u8],
algorithm: CompressionAlgorithm,
) -> Result<Vec<u8>, HlxError>
pub fn compress( data: &[u8], algorithm: CompressionAlgorithm, ) -> Result<Vec<u8>, HlxError>
Compress data using the specified algorithm
Sourcepub fn decompress(
data: &[u8],
algorithm: CompressionAlgorithm,
) -> Result<Vec<u8>, HlxError>
pub fn decompress( data: &[u8], algorithm: CompressionAlgorithm, ) -> Result<Vec<u8>, HlxError>
Decompress data using the specified algorithm
Sourcepub fn benchmark_and_select(data: &[u8]) -> CompressionAlgorithm
pub fn benchmark_and_select(data: &[u8]) -> CompressionAlgorithm
Benchmark compression algorithms for given data and return the best one
Auto Trait Implementations§
impl Freeze for CompressionManager
impl RefUnwindSafe for CompressionManager
impl Send for CompressionManager
impl Sync for CompressionManager
impl Unpin for CompressionManager
impl UnwindSafe for CompressionManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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