pub struct ParallelCompressor { /* private fields */ }Expand description
Parallel compression utilities for large resources
Implementations§
Source§impl ParallelCompressor
impl ParallelCompressor
Sourcepub fn new(compressor: AdvancedCompressor) -> Self
pub fn new(compressor: AdvancedCompressor) -> Self
Create new parallel compressor
Sourcepub fn with_chunk_size(self, chunk_size: usize) -> Self
pub fn with_chunk_size(self, chunk_size: usize) -> Self
Set chunk size for parallel compression
Sourcepub fn with_num_threads(self, num_threads: usize) -> Self
pub fn with_num_threads(self, num_threads: usize) -> Self
Set number of threads for parallel compression
Sourcepub fn compress_parallel(
&self,
data: &[u8],
algorithm: CompressionAlgorithm,
level: CompressionLevel,
) -> Result<CompressionResult>
pub fn compress_parallel( &self, data: &[u8], algorithm: CompressionAlgorithm, level: CompressionLevel, ) -> Result<CompressionResult>
Compress large data in parallel chunks
Sourcepub fn decompress_parallel(
&self,
compressed_data: &[u8],
algorithm: CompressionAlgorithm,
) -> Result<DecompressionResult>
pub fn decompress_parallel( &self, compressed_data: &[u8], algorithm: CompressionAlgorithm, ) -> Result<DecompressionResult>
Decompress parallel-compressed data
Auto Trait Implementations§
impl Freeze for ParallelCompressor
impl RefUnwindSafe for ParallelCompressor
impl Send for ParallelCompressor
impl Sync for ParallelCompressor
impl Unpin for ParallelCompressor
impl UnsafeUnpin for ParallelCompressor
impl UnwindSafe for ParallelCompressor
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