pub struct CompressionLevel(pub u32);Expand description
gzip compression level used when writing.
The level dominates the cost of writing compressed output — far more than
parsing does. On an 81 MiB FASTQ, one run took 2.8 s at level 1 and 18.6 s at
level 6, for output of 42.2 MB versus 38.9 MB: 6.5× the time to save 8%.
CompressionLevel::FAST is almost always the right choice for files that
another pipeline stage will immediately read back.
Tuple Fields§
§0: u32Implementations§
Source§impl CompressionLevel
impl CompressionLevel
Sourcepub const NONE: CompressionLevel
pub const NONE: CompressionLevel
No compression, fastest. Still a valid gzip stream.
Sourcepub const FAST: CompressionLevel
pub const FAST: CompressionLevel
Fast, slightly larger output — what pipeline intermediates want.
Sourcepub const DEFAULT: CompressionLevel
pub const DEFAULT: CompressionLevel
gzip’s own default, and this crate’s, for consistency with other tools.
Sourcepub const BEST: CompressionLevel
pub const BEST: CompressionLevel
Smallest output, slowest — for data you write once and archive.
Trait Implementations§
Source§impl Clone for CompressionLevel
impl Clone for CompressionLevel
Source§fn clone(&self) -> CompressionLevel
fn clone(&self) -> CompressionLevel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CompressionLevel
Source§impl Debug for CompressionLevel
impl Debug for CompressionLevel
Source§impl Default for CompressionLevel
impl Default for CompressionLevel
impl Eq for CompressionLevel
Source§impl PartialEq for CompressionLevel
impl PartialEq for CompressionLevel
impl StructuralPartialEq for CompressionLevel
Auto Trait Implementations§
impl Freeze for CompressionLevel
impl RefUnwindSafe for CompressionLevel
impl Send for CompressionLevel
impl Sync for CompressionLevel
impl Unpin for CompressionLevel
impl UnsafeUnpin for CompressionLevel
impl UnwindSafe for CompressionLevel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more