Struct DeflateConfig
pub struct DeflateConfig { pub level: i32, pub method: Method, pub window_bits: i32, pub mem_level: i32, pub strategy: Strategy }
Configuration for compression.
Used with compress_slice.
In most cases only the compression level is relevant. We provide three profiles:
DeflateConfig::best_speedprovides the fastest compression (at the cost of compression quality)DeflateConfig::defaulttries to find a happy middleDeflateConfig::best_compressionprovides the best compression (at the cost of longer runtime)
Fields
level: i32method: Methodwindow_bits: i32mem_level: i32strategy: Strategy
Implementations
impl DeflateConfig
fn new(level: i32) -> Selffn best_compression() -> SelfConfigure for the best compression (takes longer).
fn best_speed() -> SelfConfigure for the fastest compression (compresses less well).
Trait Implementations
impl Clone for DeflateConfig
fn clone(&self) -> Self
impl Copy for DeflateConfig
impl Debug for DeflateConfig
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for DeflateConfig
fn default() -> Self
impl Eq for DeflateConfig
impl Hash for DeflateConfig
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for DeflateConfig
fn eq(&self, other: &Self) -> bool
impl StructuralPartialEq for DeflateConfig
Auto Trait Implementations
impl Freeze for DeflateConfig
impl RefUnwindSafe for DeflateConfig
impl Send for DeflateConfig
impl Sync for DeflateConfig
impl Unpin for DeflateConfig
impl UnsafeUnpin for DeflateConfig
impl UnwindSafe for DeflateConfig
Blanket Implementations
impl<T> Any for DeflateConfig
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for DeflateConfig
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for DeflateConfig
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for DeflateConfig
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for DeflateConfig
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for DeflateConfig
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for DeflateConfig
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for DeflateConfig
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for DeflateConfig
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>