Skip to content

Generate an archive stream from any number of files on the web with concurrency

License

Notifications You must be signed in to change notification settings

privateOmega/stream-archiver

Repository files navigation

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

About

Generate an archive stream from any number of files on the web with concurrency

Topics

Resources

License

Stars

Watchers

Forks