Skip to content

Commit 6e2f5d5

Browse files
authored
flate: Use exact sizes for huffman tables (#1103)
When filling is disabled calculate exact table sizes.
1 parent bda824b commit 6e2f5d5

13 files changed

+3
-9
lines changed

flate/huffman_bit_writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ func (w *huffmanBitWriter) writeBlockDynamic(tokens *tokens, eof bool, input []b
646646
w.lastHeader = 0
647647
}
648648

649-
numLiterals, numOffsets := w.indexTokens(tokens, !sync)
649+
numLiterals, numOffsets := w.indexTokens(tokens, fillReuse && !sync)
650650
extraBits := 0
651651
ssize, storable := w.storedSize(input)
652652

-1 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.
-2 Bytes
Binary file not shown.
-2 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)