mirror of
https://github.com/containers/skopeo.git
synced 2025-09-22 10:27:08 +00:00
update github.com/containers/{image,storage}
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
5
vendor/github.com/klauspost/compress/flate/huffman_code.go
generated
vendored
5
vendor/github.com/klauspost/compress/flate/huffman_code.go
generated
vendored
@@ -6,6 +6,7 @@ package flate
|
||||
|
||||
import (
|
||||
"math"
|
||||
"math/bits"
|
||||
"sort"
|
||||
)
|
||||
|
||||
@@ -56,7 +57,9 @@ func (h *hcode) set(code uint16, length uint16) {
|
||||
func maxNode() literalNode { return literalNode{math.MaxUint16, math.MaxInt32} }
|
||||
|
||||
func newHuffmanEncoder(size int) *huffmanEncoder {
|
||||
return &huffmanEncoder{codes: make([]hcode, size)}
|
||||
// Make capacity to next power of two.
|
||||
c := uint(bits.Len32(uint32(size - 1)))
|
||||
return &huffmanEncoder{codes: make([]hcode, size, 1<<c)}
|
||||
}
|
||||
|
||||
// Generates a HuffmanCode corresponding to the fixed literal table
|
||||
|
Reference in New Issue
Block a user