gunzip-maybe
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -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 | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
91
0
5447
6
+ Addedis-deflate@^1.0.0
+ Addedis-gzip@^1.0.0
+ Addedis-deflate@1.0.0(transitive)
+ Addedis-gzip@1.0.0(transitive)