New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

async-zip-stream

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-zip-stream

Code to create zip stream from input streams in asynchronous way

1.1.0
latest
Source
npm
Version published
Weekly downloads
161
5.92%
Maintainers
1
Weekly downloads
 
Created
Source

Async Zip Stream

Build Status

Helper code to create zip stream from source readable streams. Input streams can be created in lazy manner. Main feature - streams are used sequentially.

Installation

npm i async-zip-stream

Usage

import {createZipStream} from 'async-zip-stream';

const zipSourceStream = createZipStream([
  {
    name: 'file.txt',
    async stream(): Promise<Readable> {
      return fs.createReadStream('somefile');
    },
  }
]);

const destination = fs.createWriteStream('/some/file.zip');

zipSourceStream.on('error', (error) => {
  //...
});

destination.on('error', (error) => {
  //...
});

destination.on('finish', () => {
  //...
});

zipSourceStream.pipe(destination);

Contributing

Fork it, branch it, send me a pull request. We'll work out the rest together.

Author

LICENSE

See LICENSE

FAQs

Package last updated on 03 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts