pub struct TrgtMatcherConfig {
pub compress_early_exit: usize,
pub chain_check: usize,
pub prev_table_capacity: Option<usize>,
}
Expand description
Configuration for the TrgtMatcher.
Fields§
§compress_early_exit: usize
If the small match (in trgt) is >= than this we stop searching the chain for better matches and use this one.
chain_check: usize
Max number of entries to check in the chain during matching.
Larger value means more accurate matches but slower.
compress_early_exit
stops checking the chain,
this value is the fallback in case the chain is long, and has no good matches.
prev_table_capacity: Option<usize>
How many historical hashes to store if we find multiple start points for a given hash. This memory is shared across all hashes. Leave blank for dynamic calculation.
Implementations§
Source§impl TrgtMatcherConfig
impl TrgtMatcherConfig
Sourcepub fn comp_level(level: usize) -> Self
pub fn comp_level(level: usize) -> Self
Creates a new TrgtMatcherConfig with the given compression level. level: The compression level to use. Must be between 0 and 9. The higher the level the more accurate the matches but slower.
pub fn with_table_capacity(self, table_capacity: usize) -> Self
Trait Implementations§
Source§impl Clone for TrgtMatcherConfig
impl Clone for TrgtMatcherConfig
Source§fn clone(&self) -> TrgtMatcherConfig
fn clone(&self) -> TrgtMatcherConfig
Returns a copy 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 TrgtMatcherConfig
impl Debug for TrgtMatcherConfig
Auto Trait Implementations§
impl Freeze for TrgtMatcherConfig
impl RefUnwindSafe for TrgtMatcherConfig
impl Send for TrgtMatcherConfig
impl Sync for TrgtMatcherConfig
impl Unpin for TrgtMatcherConfig
impl UnwindSafe for TrgtMatcherConfig
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