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