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:

Fields

level: i32
method: Method
window_bits: i32
mem_level: i32
strategy: Strategy

Implementations

impl DeflateConfig

fn new(level: i32) -> Self
fn best_compression() -> Self

Configure for the best compression (takes longer).

fn best_speed() -> Self

Configure 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,

impl<T> Borrow<T> for DeflateConfig where T: ?Sized,

impl<T> BorrowMut<T> for DeflateConfig where T: ?Sized,

impl<T> CloneToUninit for DeflateConfig where T: Clone,

impl<T> From<T> for DeflateConfig

impl<T> ToOwned for DeflateConfig where T: Clone,

impl<T, U> Into<U> for DeflateConfig where U: From<T>,

impl<T, U> TryFrom<U> for DeflateConfig where U: Into<T>,

impl<T, U> TryInto<U> for DeflateConfig where U: TryFrom<T>,