stream-archiver
v1.0.3
Published
Generate an archive stream from any number of files on the web with concurrency
Downloads
5
Readme
stream-archiver
stream-archiver is a node.js library to generate an archive stream from any number of files on the web with concurrency.
Installation
Use the npm to install foobar.
npm install stream-archiver
Usage
const streamArchiver = new StreamArchiver(
format,
archiverOptions,
concurrency,
streams,
files,
debug
);
await streamArchiver.process();
full fledged examples can be found under examples
Parameters
format
<?"zip"|"tar"> archive formats supported by node-archiver.archiverOptions
<?Object> options to be passed to node-archiver. Defaults to{ store: true }
.concurrency
<?Number> number of concurrent connections. Defaults to2
.streams
<?Array<Object>>stream
<?Stream> Defaults to PassThrough stream.selfDestroy
<?Boolean> Defaults tofalse
.
files
<?Array<Object>>debug
<?Boolean> show log statements in console. Defaults tofalse
.
Returns
<Promise>
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.