Mohammad Asif cf937194cb Removed un-waned things 1. 5 月之前
..
.npmignore cf937194cb Removed un-waned things 1. 5 月之前
.travis.yml cf937194cb Removed un-waned things 1. 5 月之前
LICENSE cf937194cb Removed un-waned things 1. 5 月之前
README.md cf937194cb Removed un-waned things 1. 5 月之前
index.js cf937194cb Removed un-waned things 1. 5 月之前
package.json cf937194cb Removed un-waned things 1. 5 月之前

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