Mohammad Asif cf937194cb Removed un-waned things 1. 5 meses atrás
..
.npmignore cf937194cb Removed un-waned things 1. 5 meses atrás
.travis.yml cf937194cb Removed un-waned things 1. 5 meses atrás
LICENSE cf937194cb Removed un-waned things 1. 5 meses atrás
README.md cf937194cb Removed un-waned things 1. 5 meses atrás
index.js cf937194cb Removed un-waned things 1. 5 meses atrás
package.json cf937194cb Removed un-waned things 1. 5 meses atrás

README.md

is-deflate

Check if a given Buffer or Uint8Array is deflate compressed.

Build status js-standard-style

Installation

npm install is-deflate --save

Usage

var fs = require('fs')
var zlib = require('zlib')
var isDeflate = require('is-deflate')

var buf = fs.readFileSync('my-file')

if (isDeflate(buf)) {
  zlib.inflate(buf, function (err, data) {
    if (err) throw err
    console.log(data)
  })
}

License

MIT