pub struct CompressParams { /* private fields */ }Expand description
Parameters passed to various compression routines.
Implementations§
Source§impl CompressParams
impl CompressParams
Sourcepub fn new() -> CompressParams
pub fn new() -> CompressParams
Creates a new default set of compression parameters.
Sourcepub fn mode(&mut self, mode: CompressMode) -> &mut CompressParams
pub fn mode(&mut self, mode: CompressMode) -> &mut CompressParams
Set the mode of this compression.
Sourcepub fn quality(&mut self, quality: u32) -> &mut CompressParams
pub fn quality(&mut self, quality: u32) -> &mut CompressParams
Controls the compression-speed vs compression-density tradeoffs.
The higher the quality, the slower the compression. Currently the range for the quality is 0 to 11.
Sourcepub fn lgwin(&mut self, lgwin: u32) -> &mut CompressParams
pub fn lgwin(&mut self, lgwin: u32) -> &mut CompressParams
Sets the base 2 logarithm of the sliding window size.
Currently the range is 10 to 24.
Sourcepub fn lgblock(&mut self, lgblock: u32) -> &mut CompressParams
pub fn lgblock(&mut self, lgblock: u32) -> &mut CompressParams
Sets the base 2 logarithm of the maximum input block size.
Currently the range is 16 to 24, and if set to 0 the value will be set based on the quality.
Sourcepub fn get_lgblock_readable(&self) -> usize
pub fn get_lgblock_readable(&self) -> usize
Get the current block size
Sourcepub fn get_lgblock(&self) -> u32
pub fn get_lgblock(&self) -> u32
Get the native lgblock size
Sourcepub fn get_lgwin_readable(&self) -> usize
pub fn get_lgwin_readable(&self) -> usize
Get the current window size
Trait Implementations§
Source§impl Clone for CompressParams
impl Clone for CompressParams
Source§fn clone(&self) -> CompressParams
fn clone(&self) -> CompressParams
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 moreAuto Trait Implementations§
impl Freeze for CompressParams
impl RefUnwindSafe for CompressParams
impl Send for CompressParams
impl Sync for CompressParams
impl Unpin for CompressParams
impl UnwindSafe for CompressParams
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