inflate-until
take buffer chunks until the inflated result is === size
Last updated 13 years ago by chrisdickinson .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install inflate-until 
SYNC missed versions from official npm registry.

inflate-until

a module for that really odd case where you know how big the thing you're deflating is, but you want to deflate it and know how big the compressed data was.

NB: this is slow.


var stream = inflateUntil(256, function(err, info) {
  stream.rest // the remaining contents of the 
              // last buffer

  info.compressed // the compressed size
  info.data // the inflated data
})

inflateUntil.write(buf)
inflateUntil.write(buf)
inflateUntil.write(buf)
inflateUntil.write(buf)

API

inflateUntil(size[, ready(err, info)]) -> stream

create an inflateUntil stream.

stream.rest

the remaining bytes of the last buffer written.

License

MIT

Current Tags

  • 0.0.6                                ...           latest (13 years ago)

6 Versions

  • 0.0.6                                ...           13 years ago
  • 0.0.5                                ...           13 years ago
  • 0.0.4                                ...           13 years ago
  • 0.0.3                                ...           13 years ago
  • 0.0.2                                ...           13 years ago
  • 0.0.1                                ...           13 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |