We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f50faa5 commit bda4f73Copy full SHA for bda4f73
deb/tarfile.go
@@ -89,6 +89,19 @@ func DecompressorFor(ext string) DecompressorFunc {
89
return func(r io.Reader) (io.ReadCloser, error) { return io.NopCloser(r), nil } // uncompressed file or unknown compression scheme
90
}
91
92
+// SetXZMaxDict updates the maximum dictionary size parameter for XZ
93
+// decompressing. If zero is supplied, the default max dictionary size will be
94
+// used.
95
+func SetXZMaxDict(maxDict uint32) {
96
+ knownCompressionAlgorithms[".xz"] = func(r io.Reader) (io.ReadCloser, error) {
97
+ reader, err := xz.NewReader(r, maxDict)
98
+ if err != nil {
99
+ return nil, err
100
+ }
101
+ return io.NopCloser(reader), nil
102
103
+}
104
+
105
// }}}
106
107
// IsTarfile {{{
0 commit comments