mirror of
https://github.com/containers/skopeo.git
synced 2025-09-24 03:17:17 +00:00
Update github.com/klauspost/compress to v1.17.2
... to be consistent with the just-updated docker/docker's vendor.mod. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
23
vendor/github.com/klauspost/compress/flate/fast_encoder.go
generated
vendored
23
vendor/github.com/klauspost/compress/flate/fast_encoder.go
generated
vendored
@@ -8,7 +8,6 @@ package flate
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"math/bits"
|
||||
)
|
||||
|
||||
type fastEnc interface {
|
||||
@@ -192,25 +191,3 @@ func (e *fastGen) Reset() {
|
||||
}
|
||||
e.hist = e.hist[:0]
|
||||
}
|
||||
|
||||
// matchLen returns the maximum length.
|
||||
// 'a' must be the shortest of the two.
|
||||
func matchLen(a, b []byte) int {
|
||||
var checked int
|
||||
|
||||
for len(a) >= 8 {
|
||||
if diff := binary.LittleEndian.Uint64(a) ^ binary.LittleEndian.Uint64(b); diff != 0 {
|
||||
return checked + (bits.TrailingZeros64(diff) >> 3)
|
||||
}
|
||||
checked += 8
|
||||
a = a[8:]
|
||||
b = b[8:]
|
||||
}
|
||||
b = b[:len(a)]
|
||||
for i := range a {
|
||||
if a[i] != b[i] {
|
||||
return i + checked
|
||||
}
|
||||
}
|
||||
return len(a) + checked
|
||||
}
|
||||
|
Reference in New Issue
Block a user