npm.io
0.1.1 • Published 10 years ago

gzinfo

Licence
MIT
Version
0.1.1
Deps
1
Vulns
0
Weekly
0

gzinfo

This is a simple module for reading the header and footer information of a gzip compressed file. With this module you can get information such as the uncompressed size of the file and the date when the file was compressed.

This module was written using the following references:

Install

$ npm install --production gzinfo

Example

const gzinfo = require('gzinfo')
const fileInfo = gzinfo('/path/to/some/file.gz')
console.log(`uncompressed size of file.gz is ${fileInfo.uncompressedSize} bytes`)

Documentation

The main export is a function gzinfo(file). This is merely a wrapper for the class GZInfo(file). The wrapper method returns an instance of the class. The class is exported as require('gzinfo').GZInfo if you would like to use it directly.

The full documentation for the class is in api.md.

License

MIT License

Keywords