isGzipFile reads the first two bytes of a file to see if they match the magic number for gzip (1f 8b
).
This is useful if you have a gzip task that shouldn't reprocess files, or if you have a web
server that is server pre-gzipped files (without a .gz
suffix).
npm install is-gzip
var isGzip('is-gzip');
var isGzipped = isGzip('./some-file') // returns true or false