-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
This topic came up in another issue: #336 (comment)
Today, we have an unarchive method, which supports unarchiving .tar, .tar.gz, .tar.bz2, .tar.xz, .tar.zstd, and .zip files. In the aforementioned issue, we saw a case where, for Deno, we wanted to decompress a plain .gz file-- not an archive.
To resolve it, we manually decompressed the .gz file using std.runBash and the zcat utility:
std
.download({
url: "https://github.com/denoland/rusty_v8/releases/download/v135.1.0/librusty_v8_release_x86_64-unknown-linux-gnu.a.gz",
hash: std.sha256Hash(
"406a453645473bd8f8b9a818342e57dc95627fcd1155ace9eb7a2aadd5985285",
),
})
.pipe((gzip) =>
std.runBash`
zcat "$gzip" > "$BRIOCHE_OUTPUT"
`
.env({ gzip })
.toFile(),
);We should provide a built-in way to go from a .gz file to the raw decompressed form as a utility within std. Just like with the existing .unarchive() method, we should also make sure it takes the compression format as an input, so we could add more compression formats over time.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels