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

gunzip-maybe

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gunzip-maybe - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

7

index.js

@@ -5,7 +5,8 @@ var zlib = require('zlib')

var pumpify = require('pumpify')
var isGzip = require('is-gzip')
var isDeflate = require('is-deflate')
var isCompressed = function (data) {
if (data.length < 10) return 0 // gzip header is 10 bytes
if (data[0] === 0x1f && data[1] === 0x8b && data[2] === 8) return 1 // gzip magic bytes
if (data[0] === 0x78 && (data[1] === 1 || data[1] === 0x9c || data[1] === 0xda)) return 2 // deflate magic bytes
if (isGzip(data)) return 1
if (isDeflate(data)) return 2
return 0

@@ -12,0 +13,0 @@ }

{
"name": "gunzip-maybe",
"description": "Transform stream that gunzips its input if it is gzipped and just echoes it if not",
"version": "1.3.0",
"version": "1.3.1",
"repository": {

@@ -12,2 +12,4 @@ "type": "git",

"browserify-zlib": "^0.1.4",
"is-deflate": "^1.0.0",
"is-gzip": "^1.0.0",
"peek-stream": "^1.1.0",

@@ -38,5 +40,5 @@ "pumpify": "^1.3.3",

"coordinates": [
59.91695350000001,
10.7400225
55.6666904,
12.5797771
]
}
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