pub struct XzOptions {
pub lzma_options: LzmaOptions,
pub check_type: CheckType,
pub block_size: Option<NonZeroU64>,
pub filters: Vec<FilterConfig>,
}
Available on crate features
encoder
and xz
only.Expand description
Configuration options for XZ compression.
Fields§
§lzma_options: LzmaOptions
LZMA compression options.
check_type: CheckType
Checksum type to use.
block_size: Option<NonZeroU64>
Maximum uncompressed size for each block (None = single block). Will get clamped to be at least the dict size to not waste memory.
filters: Vec<FilterConfig>
Pre-filter to use (at most 3).
Implementations§
Source§impl XzOptions
impl XzOptions
Sourcepub fn with_preset(preset: u32) -> Self
pub fn with_preset(preset: u32) -> Self
Create options with specific preset and checksum type.
Sourcepub fn set_check_sum_type(&mut self, check_type: CheckType)
pub fn set_check_sum_type(&mut self, check_type: CheckType)
Set the checksum type to use (Default is CRC64).
Sourcepub fn set_block_size(&mut self, block_size: Option<NonZeroU64>)
pub fn set_block_size(&mut self, block_size: Option<NonZeroU64>)
Set the maximum block size (None means a single block, which is the default).
Sourcepub fn prepend_pre_filter(&mut self, filter_type: FilterType, property: u32)
pub fn prepend_pre_filter(&mut self, filter_type: FilterType, property: u32)
Prepend a filter to the chain. You can prepend at most 3 additional filter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XzOptions
impl RefUnwindSafe for XzOptions
impl Send for XzOptions
impl Sync for XzOptions
impl Unpin for XzOptions
impl UnwindSafe for XzOptions
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