Package Exports
- is-deflate
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-deflate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
is-deflate
Check if a given Buffer or Uint8Array is
deflate compressed.
Installation
npm install is-deflate --saveUsage
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