catdad/ensure-gunzip

View on GitHub
README.md

Summary

Maintainability
Test Coverage
# ensure-gunzip

[![Build][1]][2]
[![Test Coverage][3]][4]
[![Code Climate][5]][6]
[![Downloads][7]][8]
[![Version][9]][8]
[![Dependency Status][10]][11]

[1]: https://travis-ci.org/catdad/ensure-gunzip.svg?branch=master
[2]: https://travis-ci.org/catdad/ensure-gunzip

[3]: https://codeclimate.com/github/catdad/ensure-gunzip/badges/coverage.svg
[4]: https://codeclimate.com/github/catdad/ensure-gunzip/coverage

[5]: https://codeclimate.com/github/catdad/ensure-gunzip/badges/gpa.svg
[6]: https://codeclimate.com/github/catdad/ensure-gunzip

[7]: https://img.shields.io/npm/dm/ensure-gunzip.svg
[8]: https://www.npmjs.com/package/ensure-gunzip
[9]: https://img.shields.io/npm/v/ensure-gunzip.svg

[10]: https://david-dm.org/catdad/ensure-gunzip.svg
[11]: https://david-dm.org/catdad/ensure-gunzip

Detects gzip compression and makes sure that a stream always gets unzipped if needed.

## Install

```bash
npm install --save ensure-gunzip
```

## Use

```javascript
var ensureGunzip = require('ensure-gunzip');

var mysteriousStream = getStreamSomehow();

var stream = ensureGunzip(mysteriousStream);

// read plain data from `stream`
```