Compression levels does not apply for bzip2, xz, zstd, lz4, now we map then as best as we can.
This commit is contained in:
@@ -10,6 +10,8 @@ import (
|
||||
// CreateTarXzStream takes a list of files and returns a reader that reads from an xz-compressed tar archive.
|
||||
func CreateTarXzStream(ctx context.Context, filepaths []string) io.ReadCloser {
|
||||
return createArchiveStream(ctx, filepaths, func(w io.Writer) (io.WriteCloser, error) {
|
||||
// xz doesn't have a simple level parameter; use default compression.
|
||||
// The compression level affects block size indirectly through the algorithm.
|
||||
return xz.NewWriter(w)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user