pub struct CParams(/* private fields */);Expand description
Compression parameters for encoders.
Implementations§
Source§impl CParams
impl CParams
Sourcepub fn compressor(&mut self, compressor: CompressAlgo) -> &mut Self
pub fn compressor(&mut self, compressor: CompressAlgo) -> &mut Self
Set the compressor to use.
By default, the compressor is set to Blosclz.
Sourcepub fn get_compressor(&self) -> CompressAlgo
pub fn get_compressor(&self) -> CompressAlgo
Get the compressor currently set in the parameters.
Sourcepub fn clevel(&mut self, clevel: u32) -> &mut Self
pub fn clevel(&mut self, clevel: u32) -> &mut Self
Set the compression level, in range [0, 9].
By default, the compression level is set to 5.
Sourcepub fn get_clevel(&self) -> u32
pub fn get_clevel(&self) -> u32
Get the compression level currently set in the parameters.
Sourcepub fn typesize(&mut self, typesize: NonZeroUsize) -> &mut Self
pub fn typesize(&mut self, typesize: NonZeroUsize) -> &mut Self
Set the typesize of the data to compress (in bytes).
By default, the typesize is set to 8 bytes.
Sourcepub fn get_typesize(&self) -> usize
pub fn get_typesize(&self) -> usize
Get the typesize currently set in the parameters.
Sourcepub fn nthreads(&mut self, nthreads: usize) -> &mut Self
pub fn nthreads(&mut self, nthreads: usize) -> &mut Self
Set the number of threads to use for compression.
By default, the number of threads is set to 1.
Sourcepub fn get_nthreads(&self) -> usize
pub fn get_nthreads(&self) -> usize
Get the number of threads currently set in the parameters.
Sourcepub fn blocksize(&mut self, blocksize: Option<usize>) -> &mut Self
pub fn blocksize(&mut self, blocksize: Option<usize>) -> &mut Self
Set the block size for compression.
None means automatic block size.
By default, an automatic block size is used.
Sourcepub fn get_blocksize(&self) -> Option<usize>
pub fn get_blocksize(&self) -> Option<usize>
Get the block size currently set in the parameters.
Sourcepub fn splitmode(&mut self, splitmode: SplitMode) -> &mut Self
pub fn splitmode(&mut self, splitmode: SplitMode) -> &mut Self
Set the split mode for the encoder.
By default, the split mode is set to ForwardCompat.
Sourcepub fn get_splitmode(&self) -> SplitMode
pub fn get_splitmode(&self) -> SplitMode
Get the split mode currently set in the parameters.
Sourcepub fn filters(&mut self, filters: &[Filter]) -> Result<&mut Self, Error>
pub fn filters(&mut self, filters: &[Filter]) -> Result<&mut Self, Error>
Set the filters to apply before compression.
The maximum number of filters is 6.
By default, a single ByteShuffle filter is applied.
Sourcepub fn get_filters(&self) -> impl Iterator<Item = Filter>
pub fn get_filters(&self) -> impl Iterator<Item = Filter>
Get the filters currently set in the parameters.