mirror of
https://github.com/containers/skopeo.git
synced 2025-09-22 18:37:21 +00:00
Image encryption/decryption support in skopeo
Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com> Signed-off-by: Brandon Lum <lumjjb@gmail.com>
This commit is contained in:
11
vendor/github.com/klauspost/compress/zstd/blockdec.go
generated
vendored
11
vendor/github.com/klauspost/compress/zstd/blockdec.go
generated
vendored
@@ -11,6 +11,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/klauspost/compress/huff0"
|
||||
"github.com/klauspost/compress/zstd/internal/xxhash"
|
||||
)
|
||||
|
||||
type blockType uint8
|
||||
@@ -160,7 +161,8 @@ func (b *blockDec) reset(br byteBuffer, windowSize uint64) error {
|
||||
b.data, err = br.readBig(cSize, b.dataStorage)
|
||||
if err != nil {
|
||||
if debug {
|
||||
println("Reading block:", err)
|
||||
println("Reading block:", err, "(", cSize, ")", len(b.data))
|
||||
printf("%T", br)
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -275,7 +277,7 @@ func (b *blockDec) decodeBuf(hist *history) error {
|
||||
hist.b = nil
|
||||
err := b.decodeCompressed(hist)
|
||||
if debug {
|
||||
println("Decompressed to total", len(b.dst), "bytes, error:", err)
|
||||
println("Decompressed to total", len(b.dst), "bytes, hash:", xxhash.Sum64(b.dst), "error:", err)
|
||||
}
|
||||
hist.b = b.dst
|
||||
b.dst = saved
|
||||
@@ -368,7 +370,7 @@ func (b *blockDec) decodeCompressed(hist *history) error {
|
||||
}
|
||||
}
|
||||
if debug {
|
||||
println("literals type:", litType, "litRegenSize:", litRegenSize, "litCompSize", litCompSize)
|
||||
println("literals type:", litType, "litRegenSize:", litRegenSize, "litCompSize:", litCompSize, "sizeFormat:", sizeFormat, "4X:", fourStreams)
|
||||
}
|
||||
var literals []byte
|
||||
var huff *huff0.Scratch
|
||||
@@ -426,7 +428,6 @@ func (b *blockDec) decodeCompressed(hist *history) error {
|
||||
}
|
||||
literals = in[:litCompSize]
|
||||
in = in[litCompSize:]
|
||||
|
||||
huff = huffDecoderPool.Get().(*huff0.Scratch)
|
||||
var err error
|
||||
// Ensure we have space to store it.
|
||||
@@ -637,7 +638,7 @@ func (b *blockDec) decodeCompressed(hist *history) error {
|
||||
hist.huffTree = huff
|
||||
}
|
||||
if debug {
|
||||
println("Final literals:", len(literals), "and", nSeqs, "sequences.")
|
||||
println("Final literals:", len(literals), "hash:", xxhash.Sum64(literals), "and", nSeqs, "sequences.")
|
||||
}
|
||||
|
||||
if nSeqs == 0 {
|
||||
|
Reference in New Issue
Block a user