aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mholt/archiver/v3/zstd.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mholt/archiver/v3/zstd.go')
-rw-r--r--vendor/github.com/mholt/archiver/v3/zstd.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/github.com/mholt/archiver/v3/zstd.go b/vendor/github.com/mholt/archiver/v3/zstd.go
index 3955628c7f..60c11efc49 100644
--- a/vendor/github.com/mholt/archiver/v3/zstd.go
+++ b/vendor/github.com/mholt/archiver/v3/zstd.go
@@ -10,11 +10,13 @@ import (
// Zstd facilitates Zstandard compression.
type Zstd struct {
+ EncoderOptions []zstd.EOption
+ DecoderOptions []zstd.DOption
}
// Compress reads in, compresses it, and writes it to out.
func (zs *Zstd) Compress(in io.Reader, out io.Writer) error {
- w, err := zstd.NewWriter(out)
+ w, err := zstd.NewWriter(out, zs.EncoderOptions...)
if err != nil {
return err
}
@@ -25,7 +27,7 @@ func (zs *Zstd) Compress(in io.Reader, out io.Writer) error {
// Decompress reads in, decompresses it, and writes it to out.
func (zs *Zstd) Decompress(in io.Reader, out io.Writer) error {
- r, err := zstd.NewReader(in)
+ r, err := zstd.NewReader(in, zs.DecoderOptions...)
if err != nil {
return err
}