0.1.1 • Published 8 years ago

gzinfo v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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