Skip to content

Quickly test to see if a file is gzipped based on its magic number

License

Notifications You must be signed in to change notification settings

jkriss/is-gzip-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-gzip-file

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).

Installation

npm install is-gzip

Usage

var isGzip('is-gzip');

var isGzipped = isGzip('./some-file') // returns true or false

About

Quickly test to see if a file is gzipped based on its magic number

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published