Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via pnpm

adm-zip 0.5.10

Javascript implementation of zip for nodejs with support for electron original-fs. Allows user to create or extract zip files both in memory or to/from disk
Package summary
Share
0
issues
1
license
1
MIT
Package created
23 Feb 2012
Version published
20 Dec 2022
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
adm-zip@0.5.10
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of adm-zip 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does adm-zip do?

ADM-ZIP is a comprehensive zip data compression library written in pure JavaScript for NodeJS. The library allows users to extract and create zip files directly to disk or in memory, making it a versatile tool for managing compressed files. With ADM-ZIP, you can effortlessly handle zip files in memory or write them on-the-go to your storage. It also provides a simple API for updating the contents of existing zip files.

How do you use adm-zip?

Using ADM-ZIP in Node.js is incredibly straightforward. After installing it via npm, you can begin incorporating its functionality into your projects right away.

To add the package to your application, first install it via npm. You can do it using the following command:

npm install adm-zip

Then, you can import the module into your JavaScript file:

var AdmZip = require('adm-zip');

To read archive files, you can initialize a new AdmZip object with the path to your desired zip file. This provides you easy access to all entries within the zip:

var zip = new AdmZip("./path_to_your_file.zip");
var zipEntries = zip.getEntries();

You can then iterate through the zip entries using a forEach loop and process each entry according to your needs:

zipEntries.forEach(function(zipEntry) {
    console.log(zipEntry.toString());
});

Creating archives is just as seamless. You can create a new archive, add files with custom content, and output the final zip file to disk:

// creating archives
var zip = new AdmZip();

// add file directly
var content = "inner content of the file";
zip.addFile("test.txt", Buffer.from(content, "utf8"), "entry comment goes here");
// write everything to disk
zip.writeZip("./path_to_your_zipfile.zip");

Where are the adm-zip docs?

The robust ADM-ZIP documentation can be accessed on its GitHub page's wiki section. The documentation features details about the API, descriptions of available methods, use cases, and numerous code examples. Visit the wiki at: ADM-ZIP Wiki to access step-by-step guides and extensive code examples covering different aspects of the library's functionality.