Resizes streams of buffers
$ npm install --save pull-resize-buffers
const pull = require('pull-streams/pull')
const values = require('pull-streams/values')
const collect = require('pull-streams/collect')
const resizeBuffers = require('pull-resize-buffers')
pull(
// a source that emits Node.js Buffers of varying lengths
values([Buffer.alloc(8192), Buffer.alloc(1024), ...]),
// reformat the buffers to all be 4096 bytes long
resizeBuffers(4096),
collect((error, buffers) => {
// `buffers` is an array of buffers all 4096 bytes long. The final buffer may be shorter
})
)