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
sourceimpl 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
sourceimpl Clone for Compression
impl Clone for Compression
sourcefn clone(&self) -> Compression
fn clone(&self) -> Compression
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Compression
impl Debug for Compression
sourceimpl Default for Compression
impl Default for Compression
sourcefn default() -> Compression
fn default() -> Compression
Choose the default compression, a balance between speed and size.
impl Copy for Compression
Auto Trait Implementations
impl RefUnwindSafe for Compression
impl Send for Compression
impl Sync for Compression
impl Unpin for Compression
impl UnwindSafe for Compression
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more