pub struct Lzma2Options { /* private fields */ }
Available on crate feature
compress
only.Expand description
Options for LZMA2 compression.
Implementations§
Source§impl Lzma2Options
impl Lzma2Options
Sourcepub fn from_level(level: u32) -> Self
pub fn from_level(level: u32) -> Self
Creates LZMA2 options with the specified compression level. Encoded using a single thread.
§Arguments
level
- Compression level (0-9, clamped to this range)
Sourcepub fn from_level_mt(level: u32, threads: u32, chunk_size: u64) -> Self
pub fn from_level_mt(level: u32, threads: u32, chunk_size: u64) -> Self
Creates LZMA2 options with the specified compression level. Encoded using a multi-threading.
§Arguments
level
- Compression level (0-9, clamped to this range)threads
- Count of threads used to compress the datachunk_size
- Size of each independent chunk of uncompressed data. The more streams can be created, the more effective is the multi threading, but the worse the compression ratio will be (value will be clamped to have at least the size of the dictionary).
Sourcepub fn set_dictionary_size(&mut self, dict_size: u32)
pub fn set_dictionary_size(&mut self, dict_size: u32)
Sets the dictionary size used when encoding.
Will be clamped between 4096..=4294967280.
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§impl From<Lzma2Options> for EncoderConfiguration
impl From<Lzma2Options> for EncoderConfiguration
Source§fn from(options: Lzma2Options) -> Self
fn from(options: Lzma2Options) -> Self
Converts to this type from the input type.
Source§impl From<Lzma2Options> for EncoderOptions
impl From<Lzma2Options> for EncoderOptions
Source§fn from(o: Lzma2Options) -> Self
fn from(o: Lzma2Options) -> Self
Converts to this type from the input type.
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