1.0.0 • Published 7 years ago

bin_streamer v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

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