pull-reader

read bytes from a binary pull stream

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
pull-reader
621.3.14 years ago7 years agoMinified + gzip package size for pull-reader in KB

Readme

pull-reader
read bytes from a binary pull-stream

example

var Reader = require('pull-reader')
var File = require('pull-file')
var reader = Reader(1000) //1 second timeout, abort upstream if read takes longer than this.


pull(
  File('./package.json'),
  reader
)

//read the first byte of a file
reader.read(1, function (err, data) {
  console.log(data.toString()) // => {
})

License

MIT