7zip-min
Minimal cross-platform pack/unpack (and any command) with 7-zip.
It does not require 7zip to be installed in your system.
This package includes standalone 7za version of 7-Zip (uses precompiled binaries from 7zip-bin package).
Supporting archive formats
According to Command Line Version User's Guide page, 7za supports only 7z, lzma, cab, zip, gzip, bzip2, Z and tar formats.
Supporting platforms
To get more details check 7zip-bin package repo.
Usage
You may use pack
and unpack
methods for simple packing/unpacking.
You can also use list
to get an array with the file content properties (includes date, time, attr, size, compressed and name)
Or use cmd
to run 7za with custom parameters (see Command Line Version User's Guide)
const _7z = require('7zip-min');
_7z.unpack('path/to/archive.7z', 'where/to/unpack', err => {
});
_7z.pack('path/to/dir/or/file', 'path/to/archive.7z', err => {
});
_7z.list('path/to/archive.7z', (err, result) => {
});
_7z.cmd(['a', 'path/to/archive.7z', 'path/to/dir/or/file'], err => {
});
Test
npm test