# gzinfo

> A small library from reading information from a gzipped file

Latest version **0.1.1** (published 2016-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install gzinfo
pnpm add gzinfo
yarn add gzinfo
bun add gzinfo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2016-05-20 |
| First published | 2016-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | James Sumners |
| Maintainers | jsumners |
| Keywords | gzip |

## Links

- npm: https://www.npmjs.com/package/gzinfo
- Repository: https://github.com/jsumners/gzinfo
- Issues: https://github.com/jsumners/gzinfo/issues
- npm.io page: https://npm.io/package/gzinfo

## Dependencies (1)

- [safe-buffer](https://npm.io/package/safe-buffer.md) ^3.0.0

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.1.1 (latest) — 2016-05-20
- 0.1.0 — 2016-05-20

## README

# 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:

+ http://forensicswiki.org/wiki/Gzip
+ http://www.gzip.org/zlib/rfc-gzip.html
+ http://git.savannah.gnu.org/cgit/gzip.git/tree/gzip.h
+ http://git.savannah.gnu.org/cgit/gzip.git/tree/gzip.c

## Install

```sh
$ npm install --production gzinfo
```

## Example

```js
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](api.md).

## License

[MIT License](http://jsumners.mit-license.org/)

---
_Source: https://npm.io/package/gzinfo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
