yenc-stream
v0.0.3
Published
Encodes and decodes a stream using yEnc.
Downloads
3
Readme
yenc-stream
Encodes and decodes buffers and streams using yEnc.
npm install yenc-stream
Then:
var yencstream = require('yenc-stream');
var encodedBuffer = yencstream.encode(buffer)
var decodedBuffer = yencstream.decode(buffer)
fs.createReadStream('image.png')
.pipe(yencstream.encodeStream()) // encode
.pipe(asciiSafeStream)
.pipe(yencstream.decodeStream()) // decode
.pipe(fs.createWriteStream('same-image.png'));