build(deps): bump github.com/klauspost/compress from 1.17.8 to 1.17.9

Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.8 to 1.17.9.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.17.8...v1.17.9)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2024-06-18 00:02:13 +00:00 committed by GitHub
parent e030f952ac
commit 9edde81067
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 41 additions and 12 deletions

2
go.mod
View File

@ -39,7 +39,7 @@ require (
github.com/google/uuid v1.6.0 github.com/google/uuid v1.6.0
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1
github.com/intel/goresctrl v0.7.0 github.com/intel/goresctrl v0.7.0
github.com/klauspost/compress v1.17.8 github.com/klauspost/compress v1.17.9
github.com/mdlayher/vsock v1.2.1 github.com/mdlayher/vsock v1.2.1
github.com/minio/sha256-simd v1.0.1 github.com/minio/sha256-simd v1.0.1
github.com/moby/locker v1.0.1 github.com/moby/locker v1.0.1

4
go.sum
View File

@ -191,8 +191,8 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=

View File

@ -273,6 +273,9 @@ func BuildDict(o BuildDictOptions) ([]byte, error) {
enc.Encode(&block, b) enc.Encode(&block, b)
addValues(&remain, block.literals) addValues(&remain, block.literals)
litTotal += len(block.literals) litTotal += len(block.literals)
if len(block.sequences) == 0 {
continue
}
seqs += len(block.sequences) seqs += len(block.sequences)
block.genCodes() block.genCodes()
addHist(&ll, block.coders.llEnc.Histogram()) addHist(&ll, block.coders.llEnc.Histogram())
@ -286,6 +289,9 @@ func BuildDict(o BuildDictOptions) ([]byte, error) {
if offset == 0 { if offset == 0 {
continue continue
} }
if int(offset) >= len(o.History) {
continue
}
if offset > 3 { if offset > 3 {
newOffsets[offset-3]++ newOffsets[offset-3]++
} else { } else {
@ -336,6 +342,9 @@ func BuildDict(o BuildDictOptions) ([]byte, error) {
if seqs/nUsed < 512 { if seqs/nUsed < 512 {
// Use 512 as minimum. // Use 512 as minimum.
nUsed = seqs / 512 nUsed = seqs / 512
if nUsed == 0 {
nUsed = 1
}
} }
copyHist := func(dst *fseEncoder, src *[256]int) ([]byte, error) { copyHist := func(dst *fseEncoder, src *[256]int) ([]byte, error) {
hist := dst.Histogram() hist := dst.Histogram()
@ -358,6 +367,28 @@ func BuildDict(o BuildDictOptions) ([]byte, error) {
fakeLength += v fakeLength += v
hist[i] = uint32(v) hist[i] = uint32(v)
} }
// Ensure we aren't trying to represent RLE.
if maxCount == fakeLength {
for i := range hist {
if uint8(i) == maxSym {
fakeLength++
maxSym++
hist[i+1] = 1
if maxSym > 1 {
break
}
}
if hist[0] == 0 {
fakeLength++
hist[i] = 1
if maxSym > 1 {
break
}
}
}
}
dst.HistogramFinished(maxSym, maxCount) dst.HistogramFinished(maxSym, maxCount)
dst.reUsed = false dst.reUsed = false
dst.useRLE = false dst.useRLE = false

View File

@ -162,12 +162,12 @@ finalize:
MOVD h, ret+24(FP) MOVD h, ret+24(FP)
RET RET
// func writeBlocks(d *Digest, b []byte) int // func writeBlocks(s *Digest, b []byte) int
TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40 TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40
LDP ·primes+0(SB), (prime1, prime2) LDP ·primes+0(SB), (prime1, prime2)
// Load state. Assume v[1-4] are stored contiguously. // Load state. Assume v[1-4] are stored contiguously.
MOVD d+0(FP), digest MOVD s+0(FP), digest
LDP 0(digest), (v1, v2) LDP 0(digest), (v1, v2)
LDP 16(digest), (v3, v4) LDP 16(digest), (v3, v4)

View File

@ -5,7 +5,6 @@
#include "textflag.h" #include "textflag.h"
// func matchLen(a []byte, b []byte) int // func matchLen(a []byte, b []byte) int
// Requires: BMI
TEXT ·matchLen(SB), NOSPLIT, $0-56 TEXT ·matchLen(SB), NOSPLIT, $0-56
MOVQ a_base+0(FP), AX MOVQ a_base+0(FP), AX
MOVQ b_base+24(FP), CX MOVQ b_base+24(FP), CX
@ -19,7 +18,6 @@ TEXT ·matchLen(SB), NOSPLIT, $0-56
matchlen_loopback_standalone: matchlen_loopback_standalone:
MOVQ (AX)(SI*1), BX MOVQ (AX)(SI*1), BX
XORQ (CX)(SI*1), BX XORQ (CX)(SI*1), BX
TESTQ BX, BX
JZ matchlen_loop_standalone JZ matchlen_loop_standalone
#ifdef GOAMD64_v3 #ifdef GOAMD64_v3
@ -27,7 +25,7 @@ matchlen_loopback_standalone:
#else #else
BSFQ BX, BX BSFQ BX, BX
#endif #endif
SARQ $0x03, BX SHRL $0x03, BX
LEAL (SI)(BX*1), SI LEAL (SI)(BX*1), SI
JMP gen_match_len_end JMP gen_match_len_end

2
vendor/modules.txt vendored
View File

@ -324,7 +324,7 @@ github.com/intel/goresctrl/pkg/utils
# github.com/json-iterator/go v1.1.12 # github.com/json-iterator/go v1.1.12
## explicit; go 1.12 ## explicit; go 1.12
github.com/json-iterator/go github.com/json-iterator/go
# github.com/klauspost/compress v1.17.8 # github.com/klauspost/compress v1.17.9
## explicit; go 1.20 ## explicit; go 1.20
github.com/klauspost/compress github.com/klauspost/compress
github.com/klauspost/compress/fse github.com/klauspost/compress/fse