pub struct EncoderConfig {
pub match_src: Option<SrcMatcherConfig>,
pub match_trgt: Option<TrgtMatcherConfig>,
pub sec_comp: Option<SecondaryCompression>,
pub format: Format,
pub output_segment_size: usize,
pub naive_tests: Option<LargerTrgtNaiveTests>,
pub lazy_escape_len: Option<usize>,
}
Expand description
Configuration for the encoder.
Default values are:
- match_src: Some(SrcMatcherConfig::new_from_compression_level(3))
- match_target: None
- sec_comp: None
- format: Interleaved
- output_segment_size: MAX_WIN_SIZE
- naive_tests: None
- lazy_escape_len: Some(45)
Fields§
§match_src: Option<SrcMatcherConfig>
Do we consider the src file as a dictionary to find matches? If so (Some(_)), any preferences set in the MatcherConfig will be used. Default Value: Some(SrcMatcherConfig::new_from_compression_level(3))
match_trgt: Option<TrgtMatcherConfig>
Whether to use the output file in an attempt to compress itself. If so (Some(_)), any preferences set in the MatcherConfig will be used. Default Value: None
sec_comp: Option<SecondaryCompression>
None for no secondary compression. Default Value: None
format: Format
Whether to interleave or segregate the Add bytes. Default Value: Interleaved
output_segment_size: usize
The size of the output window. Default Value: MAX_WIN_SIZE The minimum value is MAX_INST_SIZE.
naive_tests: Option<LargerTrgtNaiveTests>
The types of naive tests to run. Default Value: None
lazy_escape_len: Option<usize>
The length of a match that will end the lazy matching sequence. Default Value: Some(45)
Implementations§
Source§impl EncoderConfig
impl EncoderConfig
pub fn new() -> Self
pub fn no_match_src(self) -> Self
pub fn no_match_target(self) -> Self
pub fn no_sec_comp(self) -> Self
pub fn set_match_src(self, config: SrcMatcherConfig) -> Self
pub fn set_sec_comp(self, sec_comp: SecondaryCompression) -> Self
pub fn format_interleaved(self) -> Self
pub fn format_segregated(self) -> Self
pub fn set_match_target(self, config: TrgtMatcherConfig) -> Self
pub fn set_output_segment_size(self, size: usize) -> Self
pub fn set_naive_tests(self, tests: LargerTrgtNaiveTests) -> Self
pub fn set_lazy_escape_len(self, len: usize) -> Self
Sourcepub fn comp_level(
level: usize,
match_trgt: bool,
sec_comp: Option<SecondaryCompression>,
) -> Self
pub fn comp_level( level: usize, match_trgt: bool, sec_comp: Option<SecondaryCompression>, ) -> Self
Use the short hand compression level. If match_trgt is true, the same compression level will be used to set the TrgtMatcherConfig. If secondary compression is Some(_), the format will be Segregated, else Interleaved.
Trait Implementations§
Source§impl Clone for EncoderConfig
impl Clone for EncoderConfig
Source§fn clone(&self) -> EncoderConfig
fn clone(&self) -> EncoderConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more