pub struct EngineConfiguration {
pub workers: usize,
pub block_size: u32,
pub compression_level: u8,
pub max_expansion_ratio: f64,
pub max_decompression_ratio: f64,
pub checksums: bool,
pub progress: Option<Arc<Mutex<ProgressCallback>>>,
/* private fields */
}Expand description
Configuration for the parallel compression/decompression engine.
Construct via EngineConfiguration::builder() or use the Default impl.
Fields§
§workers: usizeNumber of rayon worker threads. 0 = rayon default (logical CPU count).
block_size: u32Uncompressed block size in bytes. Range: 64 KB – 256 MB.
compression_level: u8DEFLATE compression level 0–9.
max_expansion_ratio: f64If compressed / uncompressed > max_expansion_ratio, store block raw.
max_decompression_ratio: f64During decompression, halt if total bytes would exceed
compressed_file_size * max_decompression_ratio.
checksums: boolEnable per-block CRC32 checksums.
progress: Option<Arc<Mutex<ProgressCallback>>>Optional progress callback.
Implementations§
Source§impl EngineConfiguration
impl EngineConfiguration
Sourcepub fn builder() -> EngineConfigurationBuilder
pub fn builder() -> EngineConfigurationBuilder
Create a new builder.
Trait Implementations§
Source§impl Clone for EngineConfiguration
impl Clone for EngineConfiguration
Source§fn clone(&self) -> EngineConfiguration
fn clone(&self) -> EngineConfiguration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EngineConfiguration
impl !RefUnwindSafe for EngineConfiguration
impl Send for EngineConfiguration
impl Sync for EngineConfiguration
impl Unpin for EngineConfiguration
impl UnsafeUnpin for EngineConfiguration
impl !UnwindSafe for EngineConfiguration
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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