Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-gzip

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-gzip - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

license

18

index.js
'use strict';
module.exports = buf => {
if (!buf || buf.length < 3) {
return false;
}
/**
* 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;
return buf[0] === 0x1F && buf[1] === 0x8B && buf[2] === 0x08;
};
{
"name": "is-gzip",
"version": "1.0.0",
"description": "Check if a Buffer/Uint8Array is a GZIP file",
"license": "MIT",
"repository": "kevva/is-gzip",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "https://github.com/kevva"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "node test/test.js"
},
"files": [
"index.js"
],
"keywords": [
"archive",
"buffer",
"check",
"detect",
"gzip",
"type",
"uint8array"
],
"devDependencies": {
"ava": "0.0.4",
"mocha": "^1.18.2",
"read-chunk": "^1.0.0"
}
"name": "is-gzip",
"version": "2.0.0",
"description": "Check if a Buffer/Uint8Array is a GZIP file",
"license": "MIT",
"repository": "kevva/is-gzip",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "github.com/kevva"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"archive",
"buffer",
"check",
"detect",
"gzip",
"type",
"uint8array"
],
"devDependencies": {
"ava": "*",
"xo": "*"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc