diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-10 14:04:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 14:04:16 -0400 |
commit | 89a348346df1f87a4cf8bc90c7f047f8ac6a074f (patch) | |
tree | daeac876aea95914545828bfe9b4159cf07dc01d /vendor/github.com/klauspost/compress/huff0/huff0.go | |
parent | 2f0e803e7605570cd073ddffc8110a6b9d466a17 (diff) | |
parent | 98620c56d6ad0d896308a4e5858c5d1913476eaf (diff) | |
download | podman-89a348346df1f87a4cf8bc90c7f047f8ac6a074f.tar.gz podman-89a348346df1f87a4cf8bc90c7f047f8ac6a074f.tar.bz2 podman-89a348346df1f87a4cf8bc90c7f047f8ac6a074f.zip |
Merge pull request #7582 from rhatdan/VENDOR
vendor containers/storage v1.23.5
Diffstat (limited to 'vendor/github.com/klauspost/compress/huff0/huff0.go')
-rw-r--r-- | vendor/github.com/klauspost/compress/huff0/huff0.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/huff0/huff0.go b/vendor/github.com/klauspost/compress/huff0/huff0.go index 5dd66854b..7ec2022b6 100644 --- a/vendor/github.com/klauspost/compress/huff0/huff0.go +++ b/vendor/github.com/klauspost/compress/huff0/huff0.go @@ -119,6 +119,16 @@ type Scratch struct { huffWeight [maxSymbolValue + 1]byte } +// TransferCTable will transfer the previously used compression table. +func (s *Scratch) TransferCTable(src *Scratch) { + if cap(s.prevTable) < len(src.prevTable) { + s.prevTable = make(cTable, 0, maxSymbolValue+1) + } + s.prevTable = s.prevTable[:len(src.prevTable)] + copy(s.prevTable, src.prevTable) + s.prevTableLog = src.prevTableLog +} + func (s *Scratch) prepare(in []byte) (*Scratch, error) { if len(in) > BlockSizeMax { return nil, ErrTooBig |