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

decompress 4.2.1

Extracting archives made easy
Package summary
Share
0
issues
3
licenses
45
MIT
4
ISC
1
BSD-3-Clause
Package created
23 Aug 2013
Version published
1 Apr 2020
Maintainers
2
Total deps
50
Direct deps
8
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
45 Packages, Including:
base64-js@1.5.1
bl@1.2.3
buffer-alloc-unsafe@1.1.0
buffer-alloc@1.2.0
buffer-crc32@0.2.13
buffer-fill@1.0.0
buffer@5.7.1
commander@2.20.3
core-util-is@1.0.3
decompress-tar@4.1.1
decompress-tarbz2@4.1.1
decompress-targz@4.1.1
decompress-unzip@4.0.1
decompress@4.2.1
end-of-stream@1.4.4
fd-slicer@1.1.0
file-type@3.9.0
file-type@5.2.0
file-type@6.2.0
fs-constants@1.0.0
get-stream@2.3.1
is-natural-number@4.0.1
is-stream@1.1.0
isarray@1.0.0
make-dir@1.3.0
object-assign@4.1.1
pend@1.2.0
pify@2.3.0
pify@3.0.0
pinkie-promise@2.0.1
pinkie@2.0.4
process-nextick-args@2.0.1
readable-stream@2.3.8
safe-buffer@5.1.2
safe-buffer@5.2.1
seek-bzip@1.0.6
string_decoder@1.1.1
strip-dirs@2.1.0
tar-stream@1.6.2
through@2.3.8
to-buffer@1.1.1
unbzip2-stream@1.4.3
util-deprecate@1.0.2
xtend@4.0.2
yauzl@2.10.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
4 Packages, Including:
graceful-fs@4.2.11
inherits@2.0.4
once@1.4.0
wrappy@1.0.2

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
ieee754@1.2.1
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 decompress 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
decompress-tar4.1.11.97 kBMIT
prod
decompress-tarbz24.1.11.74 kBMIT
prod
decompress-targz4.1.11.74 kBMIT
prod
decompress-unzip4.0.12.11 kBMIT
prod
graceful-fs4.2.119.57 kBISC
prod
make-dir1.3.02.83 kBMIT
prod
pify2.3.02.73 kBMIT
prod
strip-dirs2.1.02.7 kBMIT
prod

Visualizations

Frequently Asked Questions

What does decompress do?

Decompress is a popular npm package that simplifies the extraction of archives. It's a handy tool for developers, as it allows for the quick and easy unpacking of compressed files. This JavaScript utility supports various archive formats and offers additional features, such as file filtering and mapping, through its robust API. It also integrates with various decompress plugins to broaden its functionality. The open-source package is maintained by Kevin Mårtensson and distributed under the MIT License.

How do you use decompress?

To use Decompress, you first need to install it by running the command npm install decompress. After installation, you can require the package in your JavaScript project:

const decompress = require('decompress');

Using Decompress to extract files from an archive is straightforward:

decompress('unicorn.zip', 'dist').then(files => {
    console.log('done!');
});

In this example, 'unicorn.zip' is the file to decompress, and 'dist' is the output directory. There's also an option to filter out certain file types before extracting. Here, '.exe' files are excluded from the extraction:

decompress('unicorn.zip', 'dist', {
    filter: file => path.extname(file.path) !== '.exe'
}).then(files => {
    console.log('done!');
});

In addition to filtering, Decompress also provides a mapping option:

decompress('unicorn.zip', 'dist', {
    map: file => {
        file.path = `unicorn-${file.path}`;
        return file;
    }
}).then(files => {
    console.log('done!');
});

And a feature to remove leading directory components from extracted files.

When working with Decompress, take note that the filter option is applied after all files from the archive have been fully read into memory. Despite the filter option, Decompress will read the entire compressed file into memory.

Where are the decompress docs?

The official docs for Decompress can be found on the GitHub page of the repository: https://github.com/kevva/decompress. Here, you'll find comprehensive information about the usage, API, and options available with this utility, as well as links to related packages and plugins. In particular, the API section provides detailed descriptions of the input, output, and options parameters, while the Usage section comes with illustrative code examples. A visit to the Decompress GitHub page is strongly recommended for anyone interested in using this highly versatile archive extraction tool.