bin_streamer
v1.0.0
Published
Binary safe streaming transform extracted from <a href="https://github.com/substack/shoe-bin">shoe-bin</a> to use as stand alone functions.
Downloads
2
Readme
bin_streamer
Binary safe streaming transform extracted from shoe-bin to use as stand alone functions.
Thanks
Thanks to substack for the base64 encode and decode functions.
var encode = require('bin_streamer').encode
var decode = require('bin_streamer').decode
fs.createReadStream('./some.zip').pipe(encode())
.on('finish', function () {
fs.createReadStream('./some_zip_to_text.txt').pipe(decode())
.pipe(fs.createWriteStream('./some_copied.zip'))
})
.pipe(fs.createWriteStream('./some_zip_to_text.txt'))
install
npm install