Brotli format change: small improvement to the encoding of Huffman codes

Combine the HSKIP and the simple/complex Huffman code type bits.
This commit is contained in:
Zoltan Szabadka
2014-01-08 12:28:28 +01:00
parent efbc1a8965
commit 4c8c7fd31c
4 changed files with 32 additions and 25 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ void EstimateBitCostsForLiterals(size_t pos, size_t len, size_t mask,
histo = 1;
}
cost[masked_pos] = log2(static_cast<double>(in_window) / histo);
cost[masked_pos] += 0.03;
cost[masked_pos] += 0.029;
if (cost[masked_pos] < 1.0) {
cost[masked_pos] *= 0.5;
cost[masked_pos] += 0.5;