diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-03 17:14:41 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-03 17:22:49 -0400 |
commit | 545aef7d9bd48b268222540ef7c5ffbf8b02ea6e (patch) | |
tree | c7286b7f1572e01104737beb13b7a0fccbd18284 /vendor/github.com/klauspost/compress/zstd/history.go | |
parent | 1f8c509fafb4ce41970c4f28ed55daec459c7520 (diff) | |
download | podman-545aef7d9bd48b268222540ef7c5ffbf8b02ea6e.tar.gz podman-545aef7d9bd48b268222540ef7c5ffbf8b02ea6e.tar.bz2 podman-545aef7d9bd48b268222540ef7c5ffbf8b02ea6e.zip |
Vendor in container/storage v1.20.2
Also modify gate Dockerfile to take advantage of skipping
mounting of the storage directory.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/history.go')
-rw-r--r-- | vendor/github.com/klauspost/compress/zstd/history.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/history.go b/vendor/github.com/klauspost/compress/zstd/history.go index e8c419bd5..f418f50fc 100644 --- a/vendor/github.com/klauspost/compress/zstd/history.go +++ b/vendor/github.com/klauspost/compress/zstd/history.go @@ -17,6 +17,7 @@ type history struct { windowSize int maxSize int error bool + dict *dict } // reset will reset the history to initial state of a frame. @@ -36,12 +37,27 @@ func (h *history) reset() { } h.decoders = sequenceDecs{} if h.huffTree != nil { - huffDecoderPool.Put(h.huffTree) + if h.dict == nil || h.dict.litDec != h.huffTree { + huffDecoderPool.Put(h.huffTree) + } } h.huffTree = nil + h.dict = nil //printf("history created: %+v (l: %d, c: %d)", *h, len(h.b), cap(h.b)) } +func (h *history) setDict(dict *dict) { + if dict == nil { + return + } + h.dict = dict + h.decoders.litLengths = dict.llDec + h.decoders.offsets = dict.ofDec + h.decoders.matchLengths = dict.mlDec + h.recentOffsets = dict.offsets + h.huffTree = dict.litDec +} + // append bytes to history. // This function will make sure there is space for it, // if the buffer has been allocated with enough extra space. |