diff --git a/src/enc/backward_references/mod.rs b/src/enc/backward_references/mod.rs index e947d69f..ffde6079 100755 --- a/src/enc/backward_references/mod.rs +++ b/src/enc/backward_references/mod.rs @@ -214,7 +214,7 @@ pub fn StoreLookaheadThenStore(hasher: &mut T, size: usize, dict: pub trait BasicHashComputer { fn HashBytes(&self, data: &[u8]) -> u32; fn BUCKET_BITS(&self) -> i32; - fn USE_DICTIONARY(&self) -> i32; + fn use_dictionary(&self) -> bool; fn BUCKET_SWEEP(&self) -> i32; } pub struct BasicHasher + SliceWrapper + BasicHashComputer> { @@ -438,7 +438,7 @@ impl + SliceWrapper + BasicHashComputer> AnyHasher } } } - if dictionary.is_some() && self.buckets_.USE_DICTIONARY() != 0 && !is_match_found { + if dictionary.is_some() && self.buckets_.use_dictionary() && !is_match_found { is_match_found = SearchInStaticDictionary( dictionary.unwrap(), dictionary_hash, @@ -469,8 +469,8 @@ impl> BasicHashComputer for H2Sub { fn BUCKET_SWEEP(&self) -> i32 { 1 } - fn USE_DICTIONARY(&self) -> i32 { - 1 + fn use_dictionary(&self) -> bool { + true } } impl> SliceWrapperMut for H2Sub { @@ -503,8 +503,8 @@ impl> BasicHashComputer for H3Sub { fn BUCKET_SWEEP(&self) -> i32 { 2 } - fn USE_DICTIONARY(&self) -> i32 { - 0 + fn use_dictionary(&self) -> bool { + false } fn HashBytes(&self, data: &[u8]) -> u32 { let h: u64 = @@ -522,8 +522,8 @@ impl> BasicHashComputer for H4Sub { fn BUCKET_SWEEP(&self) -> i32 { 4 } - fn USE_DICTIONARY(&self) -> i32 { - 1 + fn use_dictionary(&self) -> bool { + true } fn HashBytes(&self, data: &[u8]) -> u32 { let h: u64 = @@ -551,8 +551,8 @@ impl> BasicHashComputer for H54Sub { fn BUCKET_SWEEP(&self) -> i32 { 4 } - fn USE_DICTIONARY(&self) -> i32 { - 0 + fn use_dictionary(&self) -> bool { + false } fn HashBytes(&self, data: &[u8]) -> u32 { let h: u64 =