# inflate-raw

> decompress a raw DEFLATE buffer or stream in node and the browser

Latest version **1.0.0** (published 2018-08-11) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-08-11 |
| First published | 2018-08-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 36.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Renée Kooi |
| Maintainers | goto-bus-stop |
| Keywords | browserify, deflate, inflate, zlib |

## Links

- npm: https://www.npmjs.com/package/inflate-raw
- Repository: https://github.com/goto-bus-stop/inflate-raw
- Issues: https://github.com/goto-bus-stop/inflate-raw/issues
- npm.io page: https://npm.io/package/inflate-raw

## Dependencies (1)

- [pako](https://npm.io/package/pako.md) ^1.0.6

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-08-11

## README

# inflate-raw

decompress a raw DEFLATE buffer or stream in node and the browser

It uses a subset of [pako](https://npmjs.com/package/pako) in the browser which is smaller than using the zlib-browserify module.

[Install](#install) - [Usage](#usage) - [License: Apache-2.0](#license)

[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url]

[npm-image]: https://img.shields.io/npm/v/inflate-raw.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/inflate-raw
[travis-image]: https://img.shields.io/travis/com/goto-bus-stop/inflate-raw.svg?style=flat-square
[travis-url]: https://travis-ci.org/goto-bus-stop/inflate-raw
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard

## Install

```
npm install inflate-raw
```

## Usage

```js
var inflateRaw = require('inflate-raw')
inflateRaw(compressedBuffer, function (err, uncompressedBuffer) {
})

var inflateRawStream = require('inflate-raw/stream')
someCompressedStream
  .pipe(inflateRawStream())
  .pipe(elsewhere)

var inflateRawWorker = require('inflate-raw/worker')
inflateRawWorker(compressedBuffer, function (err, uncompressedBuffer) {
})
```

In the browser, the main `inflate-raw` entry point is blocking, so if you inflate a very large buffer the browser may hang. You can use `inflate-raw/worker` instead which has the same API, but offloads the inflating to a Web Worker. Note that you _cannot_ use `compressedBuffer` while inflation is in progress, because it is moved into the worker rather than copied. If you need to use the `compressedBuffer`, manually copy it first. After inflation, the `compressedBuffer` is moved back to the main thread, so you can use it again.

The `inflate-raw/stream` API is also synchronous but if the data comes streaming in in small chunks it will not noticeably lag the browser. It exposes a node-style stream transform interface.

## License

[Apache-2.0](LICENSE.md)

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