pub struct EncoderConfig {
pub level: u8,
}Available on crate feature
xz only.Expand description
Tunables for the xz encoder.
level controls the speed/ratio trade-off of the inner LZMA2 chunk
encoder: 0 is fastest and produces the largest output, 9 is slowest
and produces the smallest. The default of 6 mirrors xz-utils’ default
preset.
Values outside 0..=9 are clamped at encoder construction time — the
public surface is intentionally infallible.
Note: the level is fully threaded into our LZMA2 chunk encoder’s
match-finder tuning (chain budget + nice-match cutoff). It does not
currently affect the dictionary size advertised in the Block Header
(we stick with LZMA2_DICT_SIZE = 4 MiB regardless), nor the LZMA
literal-context (lc/lp/pb) properties (we always emit the canonical
lc=3, lp=0, pb=2 triple).
Fields§
§level: u8Compression level in 0..=9.
Trait Implementations§
Source§impl Clone for EncoderConfig
impl Clone for EncoderConfig
Source§fn clone(&self) -> EncoderConfig
fn clone(&self) -> EncoderConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EncoderConfig
Source§impl Debug for EncoderConfig
impl Debug for EncoderConfig
Source§impl Default for EncoderConfig
impl Default for EncoderConfig
impl Eq for EncoderConfig
Source§impl PartialEq for EncoderConfig
impl PartialEq for EncoderConfig
Source§fn eq(&self, other: &EncoderConfig) -> bool
fn eq(&self, other: &EncoderConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EncoderConfig
Auto Trait Implementations§
impl Freeze for EncoderConfig
impl RefUnwindSafe for EncoderConfig
impl Send for EncoderConfig
impl Sync for EncoderConfig
impl Unpin for EncoderConfig
impl UnsafeUnpin for EncoderConfig
impl UnwindSafe for EncoderConfig
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