Initial commit

This commit is contained in:
Developer
2025-04-21 16:03:20 +02:00
commit 2832896157
22874 changed files with 3092801 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# is-gzip [![Build Status](https://travis-ci.org/kevva/is-gzip.svg?branch=master)](https://travis-ci.org/kevva/is-gzip)
> Check if a Buffer/Uint8Array is a GZIP file
## Install
```sh
$ npm install --save is-gzip
```
## Usage
```js
var isGzip = require('is-gzip');
var read = require('fs').readFileSync;
isGzip(read('foo.tar.gz'));
// => true
```
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License) © [Kevin Mårtensson](https://github.com/kevva)

View File

@@ -0,0 +1,16 @@
'use strict';
/**
* Check if a Buffer/Uint8Array is a GZIP file
*
* @param {Buffer} buf
* @api public
*/
module.exports = function (buf) {
if (!buf || buf.length < 3) {
return false;
}
return buf[0] === 31 && buf[1] === 139 && buf[2] === 8;
};

View File

@@ -0,0 +1,67 @@
{
"_from": "is-gzip@^1.0.0",
"_id": "is-gzip@1.0.0",
"_inBundle": false,
"_integrity": "sha1-bKiwe5nHeZgCWQDlVc7Y7YCHmoM=",
"_location": "/is-gzip",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "is-gzip@^1.0.0",
"name": "is-gzip",
"escapedName": "is-gzip",
"rawSpec": "^1.0.0",
"saveSpec": null,
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
"/decompress-targz"
],
"_resolved": "https://registry.npmjs.org/is-gzip/-/is-gzip-1.0.0.tgz",
"_shasum": "6ca8b07b99c77998025900e555ced8ed80879a83",
"_spec": "is-gzip@^1.0.0",
"_where": "D:\\developments\\teaser-inertia\\nova-components\\NovaLeader\\node_modules\\decompress-targz",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "https://github.com/kevva"
},
"bugs": {
"url": "https://github.com/kevva/is-gzip/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Check if a Buffer/Uint8Array is a GZIP file",
"devDependencies": {
"ava": "0.0.4",
"mocha": "^1.18.2",
"read-chunk": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/kevva/is-gzip#readme",
"keywords": [
"archive",
"buffer",
"check",
"detect",
"gzip",
"type",
"uint8array"
],
"license": "MIT",
"name": "is-gzip",
"repository": {
"type": "git",
"url": "git+https://github.com/kevva/is-gzip.git"
},
"scripts": {
"test": "node test/test.js"
},
"version": "1.0.0"
}