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 Apr 26, 2024 via pnpm

archiver 6.0.1

a streaming interface for archive generation
Package summary
Share
0
issues
3
licenses
26
MIT
8
ISC
4
Apache-2.0
Package created
9 Oct 2012
Version published
4 Sep 2023
Maintainers
1
Total deps
38
Direct deps
7
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
26 Packages, Including:
archiver-utils@4.0.1
archiver@6.0.1
async@3.2.5
balanced-match@1.0.2
brace-expansion@2.0.1
buffer-crc32@0.2.13
compress-commons@5.0.3
core-util-is@1.0.3
crc32-stream@5.0.1
fast-fifo@1.3.2
isarray@1.0.0
lazystream@1.0.1
lodash@4.17.21
normalize-path@3.0.0
process-nextick-args@2.0.1
queue-tick@1.0.1
readable-stream@2.3.8
readable-stream@3.6.2
safe-buffer@5.1.2
safe-buffer@5.2.1
streamx@2.16.1
string_decoder@1.1.1
string_decoder@1.3.0
tar-stream@3.1.7
util-deprecate@1.0.2
zip-stream@5.0.2

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
8 Packages, Including:
fs.realpath@1.0.0
glob@8.1.0
graceful-fs@4.2.11
inflight@1.0.6
inherits@2.0.4
minimatch@5.1.6
once@1.4.0
wrappy@1.0.2

Apache License 2.0

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
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
4 Packages, Including:
b4a@1.6.6
bare-events@2.2.2
crc-32@1.2.2
readdir-glob@1.1.3
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

7
All Dependencies CSV
β“˜ This is a list of archiver 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
archiver-utils4.0.14.48 kBMIT
prod
async3.2.5146.47 kBMIT
prod
buffer-crc320.2.134.07 kBMIT
prod
readable-stream3.6.232.46 kBMIT
prod
readdir-glob1.1.37.87 kBApache-2.0
prod
tar-stream3.1.79.54 kBMIT
prod
zip-stream5.0.213.79 kBMIT
prod

Visualizations

Frequently Asked Questions

What does archiver do?

Archiver is a robust and flexible Node.js package that offers a streaming interface for archive generation. It has built-in support for various archive formats such as TAR and ZIP. Its architecture allows developers to seamlessly compress and decompress file contents, making it easier to manage large volumes of data or files. Archiver skillfully handles complexities associated with maintaining data integrity during the archiving process.

How do you use archiver?

To use Archiver, you first need to install it via npm using the command npm install archiver --save. After the installation, the package is required in your JavaScript file with const archiver = require('archiver');.

Here's a basic example of how Archiver can be used to create a ZIP archive:

const fs = require('fs');
const archiver = require('archiver');

// create a file to stream archive data to
const output = fs.createWriteStream('./example.zip');
const archive = archiver('zip', {
    zlib: { level: 9 } // Sets the compression level.
});

// pipe archive data to the output file
archive.pipe(output);

// append a file to the archive
archive.append(fs.createReadStream('./file1.txt'), { name: 'file1.txt' });

// finalize the archive creation
// 'close', 'end' or 'finish' may be fired right after calling this method so register to them beforehand
archive.finalize();

This code creates a new ZIP file named "example.zip". The archive.pipe(output) line instructs Archiver to send the archiving data to the output file. The archive.append... line adds "file1.txt" to the archive. The archive.finalize() method, as the name suggests, finalizes the archive, indicating that we're done adding files to it.

Where are the archiver docs?

The comprehensive documentation of Archiver can be found on the official website at https://www.archiverjs.com/. The documentation provides a complete list of available methods and how they can be used effectively in different scenarios for optimal results. It's the definitive guide to working with Archiver and an excellent resource for understanding the package's potential.