Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 2.25 KB

README.md

File metadata and controls

71 lines (51 loc) · 2.25 KB

stream-archiver

NPM Version

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 to 2.
  • streams <?Array<Object>>
  • files <?Array<Object>>
    • fileNameWithExt <?String> file name with extension.
    • url <?String> url of the file.
  • debug <?Boolean> show log statements in console. Defaults to false.

Returns

<Promise>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

ISC