Skip to content

Commit 5abe9ea

Browse files
committed
Added missing helpers functions
1 parent 42232c2 commit 5abe9ea

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

extract.go

+20
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,26 @@ func Archive(ctx context.Context, body io.Reader, location string, rename Rename
4949
return extractor.Archive(ctx, body, location, rename)
5050
}
5151

52+
// Zstd extracts a .zst or .tar.zst archived stream of data in the specified location.
53+
// It accepts a rename function to handle the names of the files (see the example)
54+
func Zstd(ctx context.Context, body io.Reader, location string, rename Renamer) error {
55+
extractor := Extractor{
56+
FS: fs{},
57+
}
58+
59+
return extractor.Zstd(ctx, body, location, rename)
60+
}
61+
62+
// Xz extracts a .xz or .tar.xz archived stream of data in the specified location.
63+
// It accepts a rename function to handle the names of the files (see the example)
64+
func Xz(ctx context.Context, body io.Reader, location string, rename Renamer) error {
65+
extractor := Extractor{
66+
FS: fs{},
67+
}
68+
69+
return extractor.Xz(ctx, body, location, rename)
70+
}
71+
5272
// Bz2 extracts a .bz2 or .tar.bz2 archived stream of data in the specified location.
5373
// It accepts a rename function to handle the names of the files (see the example)
5474
func Bz2(ctx context.Context, body io.Reader, location string, rename Renamer) error {

0 commit comments

Comments
 (0)