Struct barc::GzipCompressStrategy
source · pub struct GzipCompressStrategy { /* private fields */ }
Expand description
Strategy for gzip compression. Will not compress if a minimum length estimate is not reached.
Implementations
sourceimpl GzipCompressStrategy
impl GzipCompressStrategy
sourcepub fn set_min_len(self, size: u64) -> Self
pub fn set_min_len(self, size: u64) -> Self
Set minimum length in bytes for when to use compression. Default: 4 KiB.
sourcepub fn set_compression_level(self, level: u32) -> Self
pub fn set_compression_level(self, level: u32) -> Self
Set the compression level to use, typically on a scale of 0-9 where 0 is no compression and 9 is highest (and slowest) compression. Default: 6.
Trait Implementations
sourceimpl Clone for GzipCompressStrategy
impl Clone for GzipCompressStrategy
sourcefn clone(&self) -> GzipCompressStrategy
fn clone(&self) -> GzipCompressStrategy
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 moresourceimpl CompressStrategy for GzipCompressStrategy
impl CompressStrategy for GzipCompressStrategy
sourcefn wrap_encoder<'a>(
&self,
rec: &'a dyn MetaRecorded,
file: &'a File
) -> Result<EncodeWrapper<'a>, BarcError>
fn wrap_encoder<'a>(
&self,
rec: &'a dyn MetaRecorded,
file: &'a File
) -> Result<EncodeWrapper<'a>, BarcError>
Return an
EncodeWrapper
for File
by evaluating the
MetaRecorded
for compression worthiness. Read moresourceimpl Debug for GzipCompressStrategy
impl Debug for GzipCompressStrategy
sourceimpl Default for GzipCompressStrategy
impl Default for GzipCompressStrategy
impl Copy for GzipCompressStrategy
Auto Trait Implementations
impl RefUnwindSafe for GzipCompressStrategy
impl Send for GzipCompressStrategy
impl Sync for GzipCompressStrategy
impl Unpin for GzipCompressStrategy
impl UnwindSafe for GzipCompressStrategy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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