# inflate-until

> take buffer chunks until the inflated result is === size

Latest version **0.0.6** (published 2013-04-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install inflate-until
pnpm add inflate-until
yarn add inflate-until
bun add inflate-until
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2013-04-02 |
| First published | 2013-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Chris Dickinson |
| Maintainers | chrisdickinson |
| Keywords | inflate, until, stream |

## Links

- npm: https://www.npmjs.com/package/inflate-until
- Repository: https://github.com/chrisdickinson/inflate-until
- npm.io page: https://npm.io/package/inflate-until

## Dependencies (1)

- [through](https://npm.io/package/through.md) ~2.2.7

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2013-04-02
- 0.0.5 — 2013-04-01
- 0.0.4 — 2013-04-01
- 0.0.3 — 2013-03-25
- 0.0.2 — 2013-03-24
- 0.0.1 — 2013-03-24

## README

# 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.

```javascript

var stream = inflateUntil(256)

inflateUntil.write(buf, function(info) {
  if(info) {

  }
})

```

## API

#### inflateUntil(size) -> inflate

create an inflateUntil function.

#### inflate(buf, ready) -> undefined

add another `buf` to the available bytes. calls `ready`
when finished -- if there was enough data to determine whether
or not we've reached `size` + the adler checksum, `ready`
will receive an `info` argument:

```javascript
{ compressed: Number    // size of compressed bytes written
, rest: Buffer          // Buffer representing unused bytes
, data: Buffer }        // uncompressed data
```

## License

MIT

---
_Source: https://npm.io/package/inflate-until · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
