pub struct EncoderParams { /* private fields */ }
Available on crate feature
lz4
only.Expand description
lz4 compression parameters builder. This is a stable wrapper around lz4’s own encoder params type, to abstract over different versions of the lz4 library.
See the lz4 documentation for more information on these parameters.
§Examples
use compression_codecs::lz4;
let params = lz4::params::EncoderParams::default()
.block_size(lz4::params::BlockSize::Max1MB)
.content_checksum(true);
Implementations§
Source§impl EncoderParams
impl EncoderParams
pub fn level(self, level: Level) -> EncoderParams
Sourcepub fn block_size(self, block_size: BlockSize) -> EncoderParams
pub fn block_size(self, block_size: BlockSize) -> EncoderParams
Sets input block size.
Sourcepub fn content_checksum(self, enable: bool) -> EncoderParams
pub fn content_checksum(self, enable: bool) -> EncoderParams
Add a 32-bit checksum of frame’s decompressed data.
Sourcepub fn block_checksum(self, enable: bool) -> EncoderParams
pub fn block_checksum(self, enable: bool) -> EncoderParams
Each block followed by a checksum of block’s compressed data.
Trait Implementations§
Source§impl Clone for EncoderParams
impl Clone for EncoderParams
Source§fn clone(&self) -> EncoderParams
fn clone(&self) -> EncoderParams
Returns a duplicate 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 EncoderParams
impl Debug for EncoderParams
Source§impl Default for EncoderParams
impl Default for EncoderParams
Source§fn default() -> EncoderParams
fn default() -> EncoderParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EncoderParams
impl RefUnwindSafe for EncoderParams
impl Send for EncoderParams
impl Sync for EncoderParams
impl Unpin for EncoderParams
impl UnwindSafe for EncoderParams
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