diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-11 13:23:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-11 13:23:56 +0200 |
commit | e38001f123a04f905a37bf038b2c983ebe350996 (patch) | |
tree | 676a610092ba152a81d35868523d3c5609baaa5b /vendor/github.com/klauspost/compress/zstd/decoder.go | |
parent | 88b8d2829ced423593f40030c04662ee596740b7 (diff) | |
parent | e7085599f529f68534231b46fa95e885e68099f4 (diff) | |
download | podman-e38001f123a04f905a37bf038b2c983ebe350996.tar.gz podman-e38001f123a04f905a37bf038b2c983ebe350996.tar.bz2 podman-e38001f123a04f905a37bf038b2c983ebe350996.zip |
Merge pull request #6926 from containers/dependabot/go_modules/github.com/containers/storage-1.21.0
Bump github.com/containers/storage from 1.20.2 to 1.21.0
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/decoder.go')
-rw-r--r-- | vendor/github.com/klauspost/compress/zstd/decoder.go | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/decoder.go b/vendor/github.com/klauspost/compress/zstd/decoder.go index 75bf05bc9..66b51bf2d 100644 --- a/vendor/github.com/klauspost/compress/zstd/decoder.go +++ b/vendor/github.com/klauspost/compress/zstd/decoder.go @@ -85,6 +85,13 @@ func NewReader(r io.Reader, opts ...DOption) (*Decoder, error) { d.current.output = make(chan decodeOutput, d.o.concurrent) d.current.flushed = true + // Transfer option dicts. + d.dicts = make(map[uint32]dict, len(d.o.dicts)) + for _, dc := range d.o.dicts { + d.dicts[dc.id] = dc + } + d.o.dicts = nil + // Create decoders d.decoders = make(chan *blockDec, d.o.concurrent) for i := 0; i < d.o.concurrent; i++ { @@ -399,19 +406,6 @@ func (d *Decoder) Close() { d.current.err = ErrDecoderClosed } -// RegisterDict will load a dictionary -func (d *Decoder) RegisterDict(b []byte) error { - dc, err := loadDict(b) - if err != nil { - return err - } - if d.dicts == nil { - d.dicts = make(map[uint32]dict, 1) - } - d.dicts[dc.id] = *dc - return nil -} - // IOReadCloser returns the decoder as an io.ReadCloser for convenience. // Any changes to the decoder will be reflected, so the returned ReadCloser // can be reused along with the decoder. |