diff --git a/src/bin/integration_tests.rs b/src/bin/integration_tests.rs index e6ea6093..dc52adba 100755 --- a/src/bin/integration_tests.rs +++ b/src/bin/integration_tests.rs @@ -385,7 +385,7 @@ fn test_random_then_unicode_9() { roundtrip_helper(RANDOM_THEN_UNICODE, 9, 22, false); } #[cfg(feature="std")] -const random_then_unicode_compressed_size_9_5 : usize = 136542; +const random_then_unicode_compressed_size_9_5 : usize = 136126; #[cfg(feature="std")] const random_then_unicode_compressed_size_9_5x : usize = 136045; @@ -412,7 +412,7 @@ const alice_compressed_size_11 : usize = 46510; #[cfg(not(feature="std"))] // approx log -const random_then_unicode_compressed_size_9_5 : usize = 136719; +const random_then_unicode_compressed_size_9_5 : usize = 136409; #[cfg(not(feature="std"))] // approx log const random_then_unicode_compressed_size_9_5x : usize = 136095; diff --git a/src/enc/backward_references/mod.rs b/src/enc/backward_references/mod.rs index f280298e..e9fa5bc1 100755 --- a/src/enc/backward_references/mod.rs +++ b/src/enc/backward_references/mod.rs @@ -679,17 +679,17 @@ impl + alloc::Allocator> AnyHasher for H9 usize { - let h: u32 = BROTLI_UNALIGNED_LOAD32(data).wrapping_mul(kHashMul32); - let thirty_two : usize = 32; + let h: u64 = (BROTLI_UNALIGNED_LOAD32(data) as u64| ((data[4] as u64) << 32)).wrapping_mul(kHashMul64Long); + let thirty_two : usize = 64; (h >> (thirty_two.wrapping_sub(H9_BUCKET_BITS))) as usize } #[inline(always)] fn HashTypeLength(&self) -> usize { - 4 + 5 } #[inline(always)] fn StoreLookahead(&self) -> usize { - 4 + 5 } fn PrepareDistanceCache(&self, distance_cache: &mut [i32]) { let num_distances = H9_NUM_LAST_DISTANCES_TO_CHECK as i32;