Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goto-bus-stop/inflate-raw
decompress a raw DEFLATE buffer or stream in node and the browser
https://github.com/goto-bus-stop/inflate-raw
deflate inflate
Last synced: 28 days ago
JSON representation
decompress a raw DEFLATE buffer or stream in node and the browser
- Host: GitHub
- URL: https://github.com/goto-bus-stop/inflate-raw
- Owner: goto-bus-stop
- License: other
- Created: 2018-08-10T21:31:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-31T04:59:43.000Z (over 1 year ago)
- Last Synced: 2024-10-05T16:27:05.520Z (about 1 month ago)
- Topics: deflate, inflate
- Language: JavaScript
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
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)
```In the browser, the main `inflate-raw` entry point is blocking, so if you inflate a very large buffer the browser may hang. If it does, you may want to use something like [webworkify](https://github.com/browserify/webworkify) and do the inflating in a Worker.
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)