Struct bzip2::Compression
source · pub struct Compression(_);
Expand description
When compressing data, the compression level can be specified by a value in this enum.
Implementations§
source§impl Compression
impl Compression
sourcepub fn new(level: u32) -> Compression
pub fn new(level: u32) -> Compression
Create a new compression spec with a specific numeric level (0-9).
sourcepub fn none() -> Compression
pub fn none() -> Compression
Do not compress.
sourcepub fn fast() -> Compression
pub fn fast() -> Compression
Optimize for the best speed of encoding.
sourcepub fn best() -> Compression
pub fn best() -> Compression
Optimize for the size of data being encoded.
Trait Implementations§
source§impl Clone for Compression
impl Clone for Compression
source§fn clone(&self) -> Compression
fn clone(&self) -> Compression
Returns a copy 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 moresource§impl Debug for Compression
impl Debug for Compression
source§impl Default for Compression
impl Default for Compression
source§fn default() -> Compression
fn default() -> Compression
Choose the default compression, a balance between speed and size.