Brotli format change: improved encoding of Huffman codes

This change removes the redundant HCLEN, HLENINC and HLEN
fields from the encoding of the complex Huffman codes and
derives these from an invariant of the code length sequence.
Based on a patch by Robert Obryk.
This commit is contained in:
Zoltan Szabadka
2013-12-17 17:17:57 +01:00
parent 30625ba238
commit b89f3be40b
6 changed files with 109 additions and 145 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ void CreateBackwardReferences(size_t num_bytes,
// If we are not inserting any symbols, inserting one is more
// expensive than if we were inserting symbols anyways.
if (insert_length < 1) {
cost_diff_lazy += 1.0;
cost_diff_lazy += 0.97;
}
// Add bias to slightly avoid lazy matching.
cost_diff_lazy += 2.0 + delayed_backward_references_in_row * 0.2;