summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/zstd/zip.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-06-11 06:48:22 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-06-13 17:54:17 -0400
commit5e9d20448c52fd134ac990e9f897cbc378760fce (patch)
tree4283d9c401ee2fc166bb9377edbe1e2c071de82b /vendor/github.com/klauspost/compress/zstd/zip.go
parent9fac1b335f681400a029e9d8014f45fa5634ec40 (diff)
downloadpodman-5e9d20448c52fd134ac990e9f897cbc378760fce.tar.gz
podman-5e9d20448c52fd134ac990e9f897cbc378760fce.tar.bz2
podman-5e9d20448c52fd134ac990e9f897cbc378760fce.zip
Update vendor of containers/buildah
Changes since 2022-05-31: - add --omit-history option (buildah PR 4028) Signed-off-by: Ed Santiago <santiago@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/zip.go')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/zip.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/zip.go b/vendor/github.com/klauspost/compress/zstd/zip.go
index b53f606a1..29c15c8c4 100644
--- a/vendor/github.com/klauspost/compress/zstd/zip.go
+++ b/vendor/github.com/klauspost/compress/zstd/zip.go
@@ -18,7 +18,14 @@ const ZipMethodWinZip = 93
// See https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.9.TXT
const ZipMethodPKWare = 20
-var zipReaderPool sync.Pool
+// zipReaderPool is the default reader pool.
+var zipReaderPool = sync.Pool{New: func() interface{} {
+ z, err := NewReader(nil, WithDecoderLowmem(true), WithDecoderMaxWindow(128<<20), WithDecoderConcurrency(1))
+ if err != nil {
+ panic(err)
+ }
+ return z
+}}
// newZipReader creates a pooled zip decompressor.
func newZipReader(opts ...DOption) func(r io.Reader) io.ReadCloser {