Extracting archives made easy
See decompress-cli for the command-line version.
$ npm install decompress
const decompress = ;;
decompress(input, [output], [options])
Returns a Promise for an array of files in the following format:
data: Buffermode: Numbermtime: Stringpath: Stringtype: String
File to decompress.
Filter out files before extracting. E.g:
Note that in the current implementation,
filter is only applied after fully reading all files from the archive in memory. Do not rely on this option to limit the amount of memory used by
decompress to the size of the files included by
decompress will read the entire compressed file into memory regardless.
Map files before extracting: E.g:
[decompressTar(), decompressTarbz2(), decompressTargz(), decompressUnzip()]
Array of plugins to use.
Remove leading directory components from extracted files.
MIT © Kevin Mårtensson