summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/zstd/zstd.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-04-21 07:58:32 +0000
committerGitHub <noreply@github.com>2021-04-21 07:58:32 +0000
commit5aef11026a850bb99d8394dba17810bf05d727bc (patch)
tree43fbdf4e912923c744cfc81865f051c6783c373e /vendor/github.com/klauspost/compress/zstd/zstd.go
parent9ef298e78438b2b8654bf87db157b4090b5e0523 (diff)
downloadpodman-5aef11026a850bb99d8394dba17810bf05d727bc.tar.gz
podman-5aef11026a850bb99d8394dba17810bf05d727bc.tar.bz2
podman-5aef11026a850bb99d8394dba17810bf05d727bc.zip
Bump github.com/containers/storage from 1.29.0 to 1.30.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.29.0 to 1.30.0. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.29.0...v1.30.0) Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/zstd.go')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/zstd.go18
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 {