Skip to content

Commit 13169ae

Browse files
committed
feat(zrun): Add support for zstd
1 parent 42fb4ee commit 13169ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/zrun/cmd.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const (
8585
algoGZIP
8686
algoBZIP2
8787
algoXZ
88+
algoZSTD
8889
algoLZMA
8990
algoLZOP
9091
)
@@ -98,6 +99,8 @@ func getAlgorithm(arg string) algorithm {
9899
return algoBZIP2
99100
case strings.EqualFold(ext, ".xz"):
100101
return algoXZ
102+
case strings.EqualFold(ext, ".zst"):
103+
return algoZSTD
101104
case strings.EqualFold(ext, ".lzma"):
102105
return algoLZMA
103106
case strings.EqualFold(ext, ".lzo"):
@@ -150,6 +153,8 @@ func decompressTmp(cmd *cobra.Command, path string) (string, error) {
150153
args = []string{"bzip2", "-d", "-c"}
151154
case algoXZ:
152155
args = []string{"xz", "-d", "-c"}
156+
case algoZSTD:
157+
args = []string{"zstd", "-d", "-c"}
153158
case algoLZMA:
154159
args = []string{"lzma", "-d", "-c"}
155160
case algoLZOP:

0 commit comments

Comments
 (0)