mirror of
https://github.com/containers/skopeo.git
synced 2025-09-22 10:27:08 +00:00
Update to c/image v4.0.1
Update to use the correct c/image/v4 import path, work originally from https://github.com/containers/skopeo/pull/733 by Valentin Rothberg <rothberg@redhat.com>. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
881edbf122
commit
7922028d7c
16
vendor/github.com/klauspost/compress/zstd/encoder.go
generated
vendored
16
vendor/github.com/klauspost/compress/zstd/encoder.go
generated
vendored
@@ -211,6 +211,7 @@ func (e *Encoder) nextBlock(final bool) error {
|
||||
s.wWg.Wait()
|
||||
_, s.err = s.w.Write(blk.output)
|
||||
s.nWritten += int64(len(blk.output))
|
||||
s.eofWritten = true
|
||||
}
|
||||
return s.err
|
||||
}
|
||||
@@ -256,7 +257,12 @@ func (e *Encoder) nextBlock(final bool) error {
|
||||
}
|
||||
s.wWg.Done()
|
||||
}()
|
||||
err := blk.encode()
|
||||
err := errIncompressible
|
||||
// If we got the exact same number of literals as input,
|
||||
// assume the literals cannot be compressed.
|
||||
if len(src) != len(blk.literals) || len(src) != e.o.blockSize {
|
||||
err = blk.encode()
|
||||
}
|
||||
switch err {
|
||||
case errIncompressible:
|
||||
if debug {
|
||||
@@ -443,7 +449,13 @@ func (e *Encoder) EncodeAll(src, dst []byte) []byte {
|
||||
if len(src) == 0 {
|
||||
blk.last = true
|
||||
}
|
||||
err := blk.encode()
|
||||
err := errIncompressible
|
||||
// If we got the exact same number of literals as input,
|
||||
// assume the literals cannot be compressed.
|
||||
if len(blk.literals) != len(todo) || len(todo) != e.o.blockSize {
|
||||
err = blk.encode()
|
||||
}
|
||||
|
||||
switch err {
|
||||
case errIncompressible:
|
||||
if debug {
|
||||
|
Reference in New Issue
Block a user