Give it a Node.js Buffer and it'll give you a Node.js Readable Stream; that's all!
If you need anything fancier then use BufferStream, it does splitting and the whole kitchen sink!
A contrived example:
Not that you'd want to do exactly that but sometimes you need a Buffer to behave as a Stream.
If you need anything fancier then use BufferStream, it does splitting and the whole kitchen sink!
A contrived example:
var sbuff = require('simple-bufferstream')
sbuff(myBuffer).pipe(fs.createWriteStream('myoutput.dat'))
Not that you'd want to do exactly that but sometimes you need a Buffer to behave as a Stream.