1.0.0 • Published 7 years ago

block-write-stream v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

BlockWriteStream

npm npm license npm downloads

Garbage Collected block write stream

Install via npm

$ npm install --save block-write-stream

Usage

If run in a node process with --expose-gc enabled, it will trigger GC mark & sweep and scavenge every couple of writes to avoid the Buffers not being GCed in a timely manner, greatly reducing memory consumption. For details, see https://github.com/nodejs/node/issues/6078.

var BlockWriteStream = require('block-write-stream')
var writeStream = new BlockWriteStream({
  path: '/dev/rdisk2',
  flags: 'w',
})