stream-archiver

1.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i stream-archiver

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

35.6 kB

Total Files

12

Last publish

Collaborators

  • privateomega