xz-pipe

0.0.3 • Public • Published

xz-pipe

Pipes for xz

Installation

$ npm install xz-pipe

You will need to have the xz binary in your $PATH.

Examples

With pipes

var xz = require("xz-pipe");
var fs = require("fs");

var file_in = fs.createReadStream('./file.txt.xz');
var file_out = fs.createWriteStream('file.txt');

file_in.pipe(xz.d()).pipe(file_out);

With a callback

var xz = require("xz-pipe");
var fs = require("fs");

var file_in = fs.createReadStream('./file.txt.xz');

file_in.pipe(xz.d(function(uncompressed){
	// uncompressed is a Buffer.
	console.log(uncompressed.toString());
}));

License

It's in the Public Domain.

Readme

Keywords

none

Package Sidebar

Install

npm i xz-pipe

Weekly Downloads

3

Version

0.0.3

License

none

Unpacked Size

2.22 kB

Total Files

3

Last publish

Collaborators

  • yetzt