xz-pipe
v0.0.3
Published
pipes for xz
Downloads
11
Readme
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.