summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/fse/bytereader.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-06-17 16:29:14 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-06-17 17:27:04 +0200
commitac4f4b14829b66f6aa24b75128bd68e3a5fb53b9 (patch)
tree5591db4aecea0c0e1512cd985e9c594268979661 /vendor/github.com/klauspost/compress/fse/bytereader.go
parent1acd2adccb357c317add19cea8f0daea328e8315 (diff)
downloadpodman-ac4f4b14829b66f6aa24b75128bd68e3a5fb53b9.tar.gz
podman-ac4f4b14829b66f6aa24b75128bd68e3a5fb53b9.tar.bz2
podman-ac4f4b14829b66f6aa24b75128bd68e3a5fb53b9.zip
vendor github.com/containers/image/v5@v5.5.1
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/fse/bytereader.go')
-rw-r--r--vendor/github.com/klauspost/compress/fse/bytereader.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/vendor/github.com/klauspost/compress/fse/bytereader.go b/vendor/github.com/klauspost/compress/fse/bytereader.go
index f228a46cd..abade2d60 100644
--- a/vendor/github.com/klauspost/compress/fse/bytereader.go
+++ b/vendor/github.com/klauspost/compress/fse/bytereader.go
@@ -25,19 +25,10 @@ func (b *byteReader) advance(n uint) {
b.off += int(n)
}
-// Int32 returns a little endian int32 starting at current offset.
-func (b byteReader) Int32() int32 {
- b2 := b.b[b.off : b.off+4 : b.off+4]
- v3 := int32(b2[3])
- v2 := int32(b2[2])
- v1 := int32(b2[1])
- v0 := int32(b2[0])
- return v0 | (v1 << 8) | (v2 << 16) | (v3 << 24)
-}
-
// Uint32 returns a little endian uint32 starting at current offset.
func (b byteReader) Uint32() uint32 {
- b2 := b.b[b.off : b.off+4 : b.off+4]
+ b2 := b.b[b.off:]
+ b2 = b2[:4]
v3 := uint32(b2[3])
v2 := uint32(b2[2])
v1 := uint32(b2[1])