Mohammad Asif cf937194cb Removed un-waned things 1. | il y a 5 mois | |
---|---|---|
.. | ||
.npmignore | il y a 5 mois | |
.travis.yml | il y a 5 mois | |
LICENSE | il y a 5 mois | |
README.md | il y a 5 mois | |
index.js | il y a 5 mois | |
package.json | il y a 5 mois |
Check if a given Buffer
or Uint8Array
is
deflate compressed.
npm install is-deflate --save
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)
})
}
MIT