fraction

Fractional Buffer stream

npm install fraction
15 downloads in the last day
57 downloads in the last week
159 downloads in the last month
# Fraction

`npm install fraction`

Tiny module for piping a Buffer to a destination stream in segments. Wraps calls to `write` in process.nextTick(). Potential use case is for piping relatively large buffers to an HTTP response.

## Usage

```js
var fs = require('fs');
var file = fs.readFileSync('big-old-file.png');
var ws = fs.createWriteStream('big-old-file-out.png');

var Fraction = require('fraction');
var options = {
  //bufferSize:1024 * 64,
  //start:100,
  //end:200
};

Fraction.createStream(file, options).pipe(ws);
```



npm loves you