New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-stream-zip

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-stream-zip - npm Package Compare versions

Comparing version 1.11.7 to 1.12.0

9

node_stream_zip.d.ts

@@ -7,6 +7,13 @@ /// <reference types="node" />

* File to read
* @default undefined
*/
file: string
file?: string
/**
* Alternatively, you can pass fd here
* @default undefined
*/
fd?: number,
/**
* You will be able to work with entries inside zip archive,

@@ -13,0 +20,0 @@ * otherwise the only way to access them is entry event

27

node_stream_zip.js

@@ -166,14 +166,23 @@ /**

function open() {
fs.open(fileName, 'r', function(err, f) {
if (err)
return that.emit('error', err);
fd = f;
fs.fstat(fd, function(err, stat) {
if (config.fd) {
fd = config.fd;
readFile();
} else {
fs.open(fileName, 'r', function (err, f) {
if (err)
return that.emit('error', err);
fileSize = stat.size;
chunkSize = config.chunkSize || Math.round(fileSize / 1000);
chunkSize = Math.max(Math.min(chunkSize, Math.min(128*1024, fileSize)), Math.min(1024, fileSize));
readCentralDirectory();
fd = f;
readFile();
});
}
}
function readFile() {
fs.fstat(fd, function(err, stat) {
if (err)
return that.emit('error', err);
fileSize = stat.size;
chunkSize = config.chunkSize || Math.round(fileSize / 1000);
chunkSize = Math.max(Math.min(chunkSize, Math.min(128*1024, fileSize)), Math.min(1024, fileSize));
readCentralDirectory();
});

@@ -180,0 +189,0 @@ }

{
"name": "node-stream-zip",
"version": "1.11.7",
"version": "1.12.0",
"description": "node.js library for reading and extraction of ZIP archives",

@@ -5,0 +5,0 @@ "keywords": [

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