pub struct CompressOptions {
pub mode: CompressionMode,
pub level: u8,
pub block_size: u32,
pub checksum: bool,
pub threads: bool,
pub independent: bool,
pub dictionary: Option<Dictionary>,
pub security: SecurityPolicy,
pub encryption: Option<EncryptionKey>,
}Expand description
Compression options (library API).
Fields§
§mode: CompressionModeProfile: turbo / balanced / max.
level: u8Level 1–22.
block_size: u32Max uncompressed block size.
checksum: boolCRC32 over plaintext (default true).
threads: boolCompress blocks in parallel.
independent: boolIndependent blocks.
dictionary: Option<Dictionary>Optional dictionary.
security: SecurityPolicySecurity policy.
encryption: Option<EncryptionKey>Optional AEAD key (feature encryption).
Implementations§
Source§impl CompressOptions
impl CompressOptions
Sourcepub fn mode(self, mode: CompressionMode) -> Self
pub fn mode(self, mode: CompressionMode) -> Self
Builder: profile.
Sourcepub fn block_size(self, size: u32) -> Self
pub fn block_size(self, size: u32) -> Self
Builder: block size.
Sourcepub fn dictionary(self, dict: Dictionary) -> Self
pub fn dictionary(self, dict: Dictionary) -> Self
Builder: dictionary.
Sourcepub fn encrypt(self, key: EncryptionKey) -> Self
pub fn encrypt(self, key: EncryptionKey) -> Self
Builder: encrypt with key/password (encryption feature).
Trait Implementations§
Source§impl Clone for CompressOptions
impl Clone for CompressOptions
Source§impl Debug for CompressOptions
impl Debug for CompressOptions
Auto Trait Implementations§
impl Freeze for CompressOptions
impl RefUnwindSafe for CompressOptions
impl Send for CompressOptions
impl Sync for CompressOptions
impl Unpin for CompressOptions
impl UnsafeUnpin for CompressOptions
impl UnwindSafe for CompressOptions
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