Convert an abstract-chunk-store store into a readable or writable stream
Read/write data from/to a chunk store, with streams.
npm install chunk-store-stream
var ChunkStoreStream = require('chunk-store-stream')
var FSChunkStore = require('fs-chunk-store') // any chunk store will work
var chunkLength = 3
var store = new FSChunkStore(chunkLength)
// ... put some data in the store
var stream = new ChunkStoreStream.read(store, chunkLength, { length: 6 })
stream.pipe(process.stdout)
var ChunkStoreStream = require('chunk-store-stream')
var FSChunkStore = require('fs-chunk-store') // any chunk store will work
var fs = require('fs')
var chunkLength = 3
var store = new FSChunkStore(chunkLength)
var stream = new ChunkStoreStream.write(store, chunkLength)
fs.createReadStream('file.txt').pipe(stream)
MIT. Copyright (c) Feross Aboukhadijeh.