aboutsummaryrefslogtreecommitdiff
path: root/enc/hash.h
diff options
context:
space:
mode:
authorszabadka <szabadka@users.noreply.github.com>2014-10-28 12:54:47 +0100
committerszabadka <szabadka@users.noreply.github.com>2014-10-28 12:54:47 +0100
commitf58061638647e585dbd3b3046a8d637e35353159 (patch)
treed8c75cc7ffb9f0a794f84d3e1c0af6649336c521 /enc/hash.h
parent8102921a7c6b2b899351859edea60e7dc1237e75 (diff)
parent03b20347e1681fab9831c77975d28be23635370c (diff)
downloadbrotli-f58061638647e585dbd3b3046a8d637e35353159.zip
brotli-f58061638647e585dbd3b3046a8d637e35353159.tar.gz
brotli-f58061638647e585dbd3b3046a8d637e35353159.tar.bz2
Merge pull request #8 from szabadka/master
Minor tuning of encoder heuristics.
Diffstat (limited to 'enc/hash.h')
-rw-r--r--enc/hash.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/enc/hash.h b/enc/hash.h
index bc3e1c4..7b47e08 100644
--- a/enc/hash.h
+++ b/enc/hash.h
@@ -194,8 +194,9 @@ class HashLongestMatch {
bool match_found = false;
// Don't accept a short copy from far away.
double best_score = 8.115;
- if (insert_length_ < 4) {
- double cost_diff[4] = { 0.10, 0.04, 0.02, 0.01 };
+ if (insert_length_ < 8) {
+ double cost_diff[8] =
+ { 0.1, 0.038, 0.019, 0.013, 0.001, 0.001, 0.001, 0.001 };
best_score += cost_diff[insert_length_];
}
size_t best_len = *best_len_out;