Title: Native zip support · Issue #45434 · nodejs/node · GitHub
Open Graph Title: Native zip support · Issue #45434 · nodejs/node
X Title: Native zip support · Issue #45434 · nodejs/node
Description: What is the problem this feature will solve? This issue is to test the water a little bit. Node supports zlib natively, which takes care of the compression / decompression aspect of sharing files, but it doesn’t include any primitive all...
Open Graph Description: What is the problem this feature will solve? This issue is to test the water a little bit. Node supports zlib natively, which takes care of the compression / decompression aspect of sharing files, ...
X Description: What is the problem this feature will solve? This issue is to test the water a little bit. Node supports zlib natively, which takes care of the compression / decompression aspect of sharing files, ...
Opengraph URL: https://github.com/nodejs/node/issues/45434
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Native zip support","articleBody":"### What is the problem this feature will solve?\r\n\r\nThis issue is to test the water a little bit.\r\n\r\nNode supports zlib natively, which takes care of the compression / decompression aspect of sharing files, but it doesn’t include any primitive allowing to manipulate file archives of any kind. It can be implemented in userland (and in a project of mine we’re doing this by compiling the [libzip](https://github.com/nih-at/libzip) to wasm), but it’s significantly slower (both in runtime, boot time, and size).\r\n\r\nBeing able to read file archives is especially useful when coupled with the ESM loaders, since it then becomes possible to implement loading modules straight from packaged vendors - a more performant alternative to bundled packages which doesn’t require to precompile the code and allows distributing it along with non-JS files.\r\n\r\n### What is the feature you are proposing to solve the problem?\r\n\r\nI’d like to investigate whether it’d make sense to implement a **basic** archive manipulation library in Node.js. This isn’t unheard of, multiple interpreters having similar capabilities, sometimes even supporting multiple formats:\r\n\r\n- PHP - https://www.php.net/manual/en/zip.examples.php\r\n- Python - https://docs.python.org/3/library/zipfile.html\r\n- Python (tar) - https://docs.python.org/3/library/tarfile.html\r\n- Perl - https://perldoc.perl.org/IO::Compress::Zip\r\n- Perl (tar) - https://perldoc.perl.org/Archive::Tar\r\n- Go - https://pkg.go.dev/archive/zip@go1.19.3\r\n- Go (tar) - https://pkg.go.dev/archive/tar@go1.19.3\r\n- Java - https://docs.oracle.com/javase/7/docs/api/java/util/zip/package-summary.html\r\n- C# - https://learn.microsoft.com/en-us/dotnet/standard/io/how-to-compress-and-extract-files\r\n\r\nThe API of this **basic** archive library would be to define, but generally we can assume some simple requirements:\r\n\r\n- Read an archive’s directory listing\r\n- Stat files from within an archive\r\n- Read a buffer from an archive\r\n- Add a file to an archive\r\n\r\nI’d be interested to explore an implementation myself.\r\n\r\n### What alternatives have you considered?\r\n\r\n_No response_\r\n\r\n@nodejs/zlib ","author":{"url":"https://github.com/arcanis","@type":"Person","name":"arcanis"},"datePublished":"2022-11-11T21:39:45Z","url":"https://github.com/nodejs/node/issues/45434"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:99206b0d-6683-19a9-f347-f1b1be3972f2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F9C:254A2:831361:AED3B5:6AED28F9 |
| html-safe-nonce | 20cc7f4df59e6497c37c4cbebddf227091e8d48993fd2f27d2f0fe35a93623fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjlDOjI1NEEyOjgzMTM2MTpBRUQzQjU6NkFFRDI4RjkiLCJ2aXNpdG9yX2lkIjoiODg5NjI2OTM2OTQ5NDgwODgyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d6d51af6f0b2406a5502af9f617c096eb8e93af101e8e67d388582beecc1f001 |
| hovercard-subject-tag | issue:1446028061 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/45434/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0364a2d6feedf4a4ab3b5089286ccdb7dd034ec95b399eba7933876539ae7bc0/nodejs/node/issues/45434 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0364a2d6feedf4a4ab3b5089286ccdb7dd034ec95b399eba7933876539ae7bc0/nodejs/node/issues/45434 |
| og:image:alt | What is the problem this feature will solve? This issue is to test the water a little bit. Node supports zlib natively, which takes care of the compression / decompression aspect of sharing files, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | arcanis |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d95365dda0576efe9b71f45807595e396bd0ca9286fba5367a05048e6ddf8f2 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 98b41fa4b5635ceb45a4c54320fced73817ff290 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width