mirror of
https://github.com/containers/skopeo.git
synced 2025-09-23 02:48:26 +00:00
Bump github.com/containers/storage from 1.23.4 to 1.23.5
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.23.4 to 1.23.5. - [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.23.4...v1.23.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
committed by
Daniel J Walsh
parent
5dd09d76c3
commit
4eda1d092d
26
vendor/github.com/klauspost/compress/zstd/frameenc.go
generated
vendored
26
vendor/github.com/klauspost/compress/zstd/frameenc.go
generated
vendored
@@ -5,6 +5,7 @@
|
||||
package zstd
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
@@ -16,7 +17,7 @@ type frameHeader struct {
|
||||
WindowSize uint32
|
||||
SingleSegment bool
|
||||
Checksum bool
|
||||
DictID uint32 // Not stored.
|
||||
DictID uint32
|
||||
}
|
||||
|
||||
const maxHeaderSize = 14
|
||||
@@ -30,6 +31,24 @@ func (f frameHeader) appendTo(dst []byte) ([]byte, error) {
|
||||
if f.SingleSegment {
|
||||
fhd |= 1 << 5
|
||||
}
|
||||
|
||||
var dictIDContent []byte
|
||||
if f.DictID > 0 {
|
||||
var tmp [4]byte
|
||||
if f.DictID < 256 {
|
||||
fhd |= 1
|
||||
tmp[0] = uint8(f.DictID)
|
||||
dictIDContent = tmp[:1]
|
||||
} else if f.DictID < 1<<16 {
|
||||
fhd |= 2
|
||||
binary.LittleEndian.PutUint16(tmp[:2], uint16(f.DictID))
|
||||
dictIDContent = tmp[:2]
|
||||
} else {
|
||||
fhd |= 3
|
||||
binary.LittleEndian.PutUint32(tmp[:4], f.DictID)
|
||||
dictIDContent = tmp[:4]
|
||||
}
|
||||
}
|
||||
var fcs uint8
|
||||
if f.ContentSize >= 256 {
|
||||
fcs++
|
||||
@@ -40,6 +59,7 @@ func (f frameHeader) appendTo(dst []byte) ([]byte, error) {
|
||||
if f.ContentSize >= 0xffffffff {
|
||||
fcs++
|
||||
}
|
||||
|
||||
fhd |= fcs << 6
|
||||
|
||||
dst = append(dst, fhd)
|
||||
@@ -48,7 +68,9 @@ func (f frameHeader) appendTo(dst []byte) ([]byte, error) {
|
||||
windowLog := (bits.Len32(f.WindowSize-1) - winLogMin) << 3
|
||||
dst = append(dst, uint8(windowLog))
|
||||
}
|
||||
|
||||
if f.DictID > 0 {
|
||||
dst = append(dst, dictIDContent...)
|
||||
}
|
||||
switch fcs {
|
||||
case 0:
|
||||
if f.SingleSegment {
|
||||
|
Reference in New Issue
Block a user