Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unbzip2-stream

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unbzip2-stream

streaming unbzip2 implementation in pure javascript for node and browsers

  • 1.4.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is unbzip2-stream?

The unbzip2-stream npm package is a Node.js library used for decompressing data in the bzip2 format. It is particularly useful for handling large bzip2 files or streams, such as those downloaded from the internet or read from a file system, by decompressing them on-the-fly.

What are unbzip2-stream's main functionalities?

Decompress bzip2 file

This code demonstrates how to decompress a bzip2 compressed file using unbzip2-stream. It reads a bzip2 file, decompresses it, and writes the decompressed data to a new file.

const fs = require('fs');
const bunzip2 = require('unbzip2-stream');

fs.createReadStream('path/to/compressed-file.bz2')
  .pipe(bunzip2())
  .pipe(fs.createWriteStream('path/to/decompressed-file'));

Decompress bzip2 stream

This example shows how to decompress a bzip2 stream from a URL and pipe the output directly to the standard output. This is useful for processing data on-the-fly without storing it.

const request = require('request');
const bunzip2 = require('unbzip2-stream');

request('http://example.com/file.bz2')
  .pipe(bunzip2())
  .pipe(process.stdout);

Other packages similar to unbzip2-stream

Keywords

FAQs

Package last updated on 21 Apr 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc