Turn a Buffer into a Stream (simplistic version)
npm install simple-bufferstream
|3||downloads in the last day|
|73||downloads in the last week|
|232||downloads in the last month|
|Version||0.0.4 last updated 8 months ago|
|Keywords||buffer, stream, bufferstream|
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:
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.
Simple BufferStream is Copyright (c) 2012 Rod Vagg @rvagg and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.