diff --git a/enc/block_splitter.cc b/enc/block_splitter.cc index 831c3e2..9eb5642 100644 --- a/enc/block_splitter.cc +++ b/enc/block_splitter.cc @@ -33,7 +33,7 @@ namespace brotli { static const int kMaxLiteralHistograms = 100; static const int kMaxCommandHistograms = 50; -static const double kLiteralBlockSwitchCost = 26; +static const double kLiteralBlockSwitchCost = 28.1; static const double kCommandBlockSwitchCost = 13.5; static const double kDistanceBlockSwitchCost = 14.6; static const int kLiteralStrideLength = 70; 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;