Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for unarchiving .zip archives #88

Open
kylewlacy opened this issue Jul 15, 2024 · 0 comments
Open

Add support for unarchiving .zip archives #88

kylewlacy opened this issue Jul 15, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kylewlacy
Copy link
Member

The unarchive recipe (e.g. std.download({ ... }).unarchive("tar", "gzip")) supports multiple compression formats, but currently only supports tar archives. Zip archives are also pretty common, so we should update the recipe to also support zip as an archive type

const source = std
  .download({
    url: "https://github.com/brioche-dev/brioche/archive/refs/tags/v0.1.1.zip",
    hash: std.sha256sum("1e98a694fe530de5d641ecfa03c0f2f61ba7eba020866a1876ab2c4eaffb1525"),
  })
  .unarchive("zip");

Zip files can themselves be compressed, so there isn't an extra layer of decompression to worry about like you often see with .tar files. In other words, unarchiving a zip file will usually not specify a compression format. However, for consistency, it might still make sense to allow specifying a decompression format, even though I wouldn't expect it to be used in practice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant