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

archiver 0.21.0

a streaming interface for archive generation
Package summary
Share
7
issues
1
critical severity
vulnerability
1
3
high severity
vulnerability
3
2
moderate severity
vulnerability
2
1
low severity
vulnerability
1
2
licenses
32
MIT
6
ISC
Package created
9 Oct 2012
Version published
22 Dec 2015
Maintainers
1
Total deps
38
Direct deps
8
License
MIT

Issues

7

1 critical severity issue

critical
Recommendation: Upgrade to version 4.17.12 or later
via: archiver-utils@0.3.0 & others
Collapse
Expand

3 high severity issues

high
Recommendation: Upgrade to version 4.17.11 or later
via: archiver-utils@0.3.0 & others
Recommendation: Upgrade to version 4.17.19 or later
via: archiver-utils@0.3.0 & others
Recommendation: Upgrade to version 4.17.21 or later
via: archiver-utils@0.3.0 & others
Collapse
Expand

2 moderate severity issues

moderate
Recommendation: Upgrade to version 4.17.11 or later
via: archiver-utils@0.3.0 & others
Recommendation: Upgrade to version 4.17.21 or later
via: archiver-utils@0.3.0 & others
Collapse
Expand

1 low severity issue

low
Recommendation: Upgrade to version 4.17.5 or later
via: archiver-utils@0.3.0 & others
Collapse
Expand

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
32 Packages, Including:
archiver-utils@0.3.0
archiver@0.21.0
async@1.5.2
balanced-match@1.0.2
bl@1.2.3
brace-expansion@1.1.11
buffer-crc32@0.2.13
compress-commons@0.4.2
concat-map@0.0.1
core-util-is@1.0.3
crc32-stream@0.4.0
end-of-stream@1.4.4
isarray@0.0.1
isarray@1.0.0
lazystream@0.1.0
lodash@3.10.1
node-int64@0.4.0
normalize-path@2.0.1
path-is-absolute@1.0.1
process-nextick-args@1.0.7
process-nextick-args@2.0.1
readable-stream@1.0.34
readable-stream@2.0.6
readable-stream@2.3.8
safe-buffer@5.1.2
safe-buffer@5.2.1
string_decoder@0.10.31
string_decoder@1.1.1
tar-stream@1.3.2
util-deprecate@1.0.2
xtend@4.0.2
zip-stream@0.8.0

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
6 Packages, Including:
glob@6.0.4
inflight@1.0.6
inherits@2.0.4
minimatch@3.1.2
once@1.4.0
wrappy@1.0.2
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

8
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-utils0.3.04.61 kBMIT
prod
1
3
2
1
async1.5.238.01 kBMIT
prod
buffer-crc320.2.134.07 kBMIT
prod
glob6.0.414.17 kBISC
prod
lodash3.10.1169.48 kBMIT
prod
1
3
2
1
readable-stream2.0.633.71 kBMIT
prod
tar-stream1.3.27.55 kBMIT
prod
zip-stream0.8.03.48 kBMIT
prod
1
3
2
1

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.