pub struct Lzma2Options {
pub lzma_options: LzmaOptions,
pub chunk_size: Option<NonZeroU64>,
}
Available on crate feature
encoder
only.Expand description
Options for LZMA2 compression.
Fields§
§lzma_options: LzmaOptions
LZMA compression options.
chunk_size: Option<NonZeroU64>
The size of each independent chunk in bytes. If not set, the whole data will be written as one chunk. Will get clamped to be at least the dict size to not waste memory.
Implementations§
Source§impl Lzma2Options
impl Lzma2Options
Sourcepub fn with_preset(preset: u32) -> Self
pub fn with_preset(preset: u32) -> Self
Create options with specific preset.
Sourcepub fn set_chunk_size(&mut self, chunk_size: Option<NonZeroU64>)
pub fn set_chunk_size(&mut self, chunk_size: Option<NonZeroU64>)
Set the chunk size (None means a single chunk, which is the default). Chunk size will be clamped to be at least the dictionary size.
Trait Implementations§
Source§impl Clone for Lzma2Options
impl Clone for Lzma2Options
Source§fn clone(&self) -> Lzma2Options
fn clone(&self) -> Lzma2Options
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 moreSource§impl Debug for Lzma2Options
impl Debug for Lzma2Options
Source§impl Default for Lzma2Options
impl Default for Lzma2Options
Source§fn default() -> Lzma2Options
fn default() -> Lzma2Options
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Lzma2Options
impl RefUnwindSafe for Lzma2Options
impl Send for Lzma2Options
impl Sync for Lzma2Options
impl Unpin for Lzma2Options
impl UnwindSafe for Lzma2Options
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