diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-21 15:41:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 15:41:46 -0400 |
commit | 5c8ba488078c7ee71e5b3a2cbb2bf770734d6c81 (patch) | |
tree | 7b6ec387c3006e83c4e3168412e9e70e5565ff45 /vendor/github.com/klauspost/compress/zstd/zstd.go | |
parent | 897f6c3a4a55bfc82a989c81cb3dc8998965c408 (diff) | |
parent | 5aef11026a850bb99d8394dba17810bf05d727bc (diff) | |
download | podman-5c8ba488078c7ee71e5b3a2cbb2bf770734d6c81.tar.gz podman-5c8ba488078c7ee71e5b3a2cbb2bf770734d6c81.tar.bz2 podman-5c8ba488078c7ee71e5b3a2cbb2bf770734d6c81.zip |
Merge pull request #10097 from containers/dependabot/go_modules/github.com/containers/storage-1.30.0
Bump github.com/containers/storage from 1.29.0 to 1.30.0
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/zstd.go')
-rw-r--r-- | vendor/github.com/klauspost/compress/zstd/zstd.go | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/zstd.go b/vendor/github.com/klauspost/compress/zstd/zstd.go index 9056beef2..1ba308c8b 100644 --- a/vendor/github.com/klauspost/compress/zstd/zstd.go +++ b/vendor/github.com/klauspost/compress/zstd/zstd.go @@ -5,6 +5,7 @@ package zstd import ( "bytes" + "encoding/binary" "errors" "log" "math" @@ -126,26 +127,15 @@ func matchLen(a, b []byte) int { } func load3232(b []byte, i int32) uint32 { - // Help the compiler eliminate bounds checks on the read so it can be done in a single read. - b = b[i:] - b = b[:4] - return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + return binary.LittleEndian.Uint32(b[i:]) } func load6432(b []byte, i int32) uint64 { - // Help the compiler eliminate bounds checks on the read so it can be done in a single read. - b = b[i:] - b = b[:8] - 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 + return binary.LittleEndian.Uint64(b[i:]) } func load64(b []byte, i int) uint64 { - // Help the compiler eliminate bounds checks on the read so it can be done in a single read. - b = b[i:] - b = b[:8] - 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 + return binary.LittleEndian.Uint64(b[i:]) } type byter interface { |