Struct barc::BrotliCompressStrategy
source · pub struct BrotliCompressStrategy { /* private fields */ }
Expand description
Strategy for Brotli compression. Will not compress if a minimum length estimate is not reached.
Implementations
sourceimpl BrotliCompressStrategy
impl BrotliCompressStrategy
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: 1 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 BrotliCompressStrategy
impl Clone for BrotliCompressStrategy
sourcefn clone(&self) -> BrotliCompressStrategy
fn clone(&self) -> BrotliCompressStrategy
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 BrotliCompressStrategy
impl CompressStrategy for BrotliCompressStrategy
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 BrotliCompressStrategy
impl Debug for BrotliCompressStrategy
sourceimpl Default for BrotliCompressStrategy
impl Default for BrotliCompressStrategy
impl Copy for BrotliCompressStrategy
Auto Trait Implementations
impl RefUnwindSafe for BrotliCompressStrategy
impl Send for BrotliCompressStrategy
impl Sync for BrotliCompressStrategy
impl Unpin for BrotliCompressStrategy
impl UnwindSafe for BrotliCompressStrategy
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