diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2021-01-28 09:17:40 +0000 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-01-28 04:51:57 -0500 |
commit | 75c3b33899954e7a0925426b38fd1084d521c3a0 (patch) | |
tree | ff5dafd9eaedf43c87f0a868a779792492d84539 /vendor/github.com/klauspost/compress/zstd | |
parent | 9d59daa7ccaea526a1aa742fadab537e77a51330 (diff) | |
download | podman-75c3b33899954e7a0925426b38fd1084d521c3a0.tar.gz podman-75c3b33899954e7a0925426b38fd1084d521c3a0.tar.bz2 podman-75c3b33899954e7a0925426b38fd1084d521c3a0.zip |
Bump github.com/containers/image/v5 from 5.9.0 to 5.10.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.9.0 to 5.10.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.9.0...v5.10.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd')
-rw-r--r-- | vendor/github.com/klauspost/compress/zstd/decoder.go | 7 | ||||
-rw-r--r-- | vendor/github.com/klauspost/compress/zstd/zstd.go | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/decoder.go b/vendor/github.com/klauspost/compress/zstd/decoder.go index 62fd37324..1d41c25d2 100644 --- a/vendor/github.com/klauspost/compress/zstd/decoder.go +++ b/vendor/github.com/klauspost/compress/zstd/decoder.go @@ -5,7 +5,6 @@ package zstd import ( - "bytes" "errors" "io" "sync" @@ -179,11 +178,13 @@ func (d *Decoder) Reset(r io.Reader) error { } // If bytes buffer and < 1MB, do sync decoding anyway. - if bb, ok := r.(*bytes.Buffer); ok && bb.Len() < 1<<20 { + if bb, ok := r.(byter); ok && bb.Len() < 1<<20 { + var bb2 byter + bb2 = bb if debug { println("*bytes.Buffer detected, doing sync decode, len:", bb.Len()) } - b := bb.Bytes() + b := bb2.Bytes() var dst []byte if cap(d.current.b) > 0 { dst = d.current.b diff --git a/vendor/github.com/klauspost/compress/zstd/zstd.go b/vendor/github.com/klauspost/compress/zstd/zstd.go index 0c761dd62..9056beef2 100644 --- a/vendor/github.com/klauspost/compress/zstd/zstd.go +++ b/vendor/github.com/klauspost/compress/zstd/zstd.go @@ -4,6 +4,7 @@ package zstd import ( + "bytes" "errors" "log" "math" @@ -146,3 +147,10 @@ func load64(b []byte, i int) uint64 { return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 } + +type byter interface { + Bytes() []byte + Len() int +} + +var _ byter = &bytes.Buffer{} |