pub struct Filters { /* private fields */ }
Expand description
A custom chain of filters to configure an encoding stream.
Implementations§
Source§impl Filters
impl Filters
Sourcepub fn lzma1(&mut self, opts: &LzmaOptions) -> &mut Filters
pub fn lzma1(&mut self, opts: &LzmaOptions) -> &mut Filters
Add an LZMA1 filter.
LZMA1 is the very same thing as what was called just LZMA in LZMA Utils, 7-Zip, and LZMA SDK. It’s called LZMA1 here to prevent developers from accidentally using LZMA when they actually want LZMA2.
LZMA1 shouldn’t be used for new applications unless you really know what you are doing. LZMA2 is almost always a better choice.
Sourcepub fn lzma2(&mut self, opts: &LzmaOptions) -> &mut Filters
pub fn lzma2(&mut self, opts: &LzmaOptions) -> &mut Filters
Add an LZMA2 filter.
Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
support for SyncFlush
, uncompressed chunks (smaller expansion when
trying to compress uncompressible data), possibility to change
literal_context_bits
/literal_position_bits
/position_bits
in the
middle of encoding, and some other internal improvements.
Auto Trait Implementations§
impl Freeze for Filters
impl RefUnwindSafe for Filters
impl !Send for Filters
impl !Sync for Filters
impl Unpin for Filters
impl UnwindSafe for Filters
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