diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-29 05:56:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 05:56:13 -0400 |
commit | 386b7f94f30ebb67e0073e0d31a9f203f0ac6db7 (patch) | |
tree | f7e75f22fb25c5a790485ddedff5e75aaa783760 /vendor/github.com/klauspost/compress/flate/level6.go | |
parent | db67fedcbd1fcaf06d0d6655face5182ccd0cc87 (diff) | |
parent | 3645db969891230db126ca8f35ccad3cd40af8f0 (diff) | |
download | podman-386b7f94f30ebb67e0073e0d31a9f203f0ac6db7.tar.gz podman-386b7f94f30ebb67e0073e0d31a9f203f0ac6db7.tar.bz2 podman-386b7f94f30ebb67e0073e0d31a9f203f0ac6db7.zip |
Merge pull request #10172 from containers/dependabot/go_modules/github.com/containers/storage-1.30.1
Bump github.com/containers/storage from 1.30.0 to 1.30.1
Diffstat (limited to 'vendor/github.com/klauspost/compress/flate/level6.go')
-rw-r--r-- | vendor/github.com/klauspost/compress/flate/level6.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/flate/level6.go b/vendor/github.com/klauspost/compress/flate/level6.go index a52c80ea4..a709977ec 100644 --- a/vendor/github.com/klauspost/compress/flate/level6.go +++ b/vendor/github.com/klauspost/compress/flate/level6.go @@ -211,6 +211,31 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) { l += e.matchlenLong(s+l, t+l, src) } + // Try to locate a better match by checking the end-of-match... + if sAt := s + l; sAt < sLimit { + eLong := &e.bTable[hash7(load6432(src, sAt), tableBits)] + // Test current + t2 := eLong.Cur.offset - e.cur - l + off := s - t2 + if off < maxMatchOffset { + if off > 0 && t2 >= 0 { + if l2 := e.matchlenLong(s, t2, src); l2 > l { + t = t2 + l = l2 + } + } + // Test next: + t2 = eLong.Prev.offset - e.cur - l + off := s - t2 + if off > 0 && off < maxMatchOffset && t2 >= 0 { + if l2 := e.matchlenLong(s, t2, src); l2 > l { + t = t2 + l = l2 + } + } + } + } + // Extend backwards for t > 0 && s > nextEmit && src[t-1] == src[s-1] { s-- |