node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »

is-gzip

is-gzip Build Status

Check if a Buffer/Uint8Array is a GZIP file

Install

$ npm install is-gzip

Usage

const fs = require('fs');
const isGzip = require('is-gzip');
 
isGzip(fs.readFileSync('foo.tar.gz'));
//=> true 

License

MIT © Kevin Mårtensson