Socket
Socket
Sign inDemoInstall

compress-commons

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compress-commons - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

26

lib/archivers/zip/zip-archive-output-stream.js

@@ -177,2 +177,3 @@ /**

ZipArchiveOutputStream.prototype._writeCentralFileHeader = function(ae) {
var gpb = ae.getGeneralPurposeBit();
var method = ae.getMethod();

@@ -206,16 +207,18 @@ var offsets = ae._offsets;

var name = ae.getName();
var nameLength = Buffer.byteLength(name);
var comment = ae.getComment();
var commentLength = Buffer.byteLength(comment);
var extra = ae.getCentralDirectoryExtra();
var extraLength = extra.length;
if (gpb.usesUTF8ForNames()) {
name = new Buffer(name);
comment = new Buffer(comment);
}
// name length
this.write(zipUtil.getShortBytes(nameLength));
this.write(zipUtil.getShortBytes(name.length));
// extra length
this.write(zipUtil.getShortBytes(extraLength));
this.write(zipUtil.getShortBytes(extra.length));
// comments length
this.write(zipUtil.getShortBytes(commentLength));
this.write(zipUtil.getShortBytes(comment.length));

@@ -261,8 +264,11 @@ // disk number start

ZipArchiveOutputStream.prototype._writeLocalFileHeader = function(ae) {
var gpb = ae.getGeneralPurposeBit();
var method = ae.getMethod();
var name = ae.getName();
var nameLength = Buffer.byteLength(name);
var extra = ae.getLocalFileDataExtra();
var extraLength = extra.length;
if (gpb.usesUTF8ForNames()) {
name = new Buffer(name);
}
ae._offsets.file = this.offset;

@@ -297,6 +303,6 @@

// name length
this.write(zipUtil.getShortBytes(nameLength));
this.write(zipUtil.getShortBytes(name.length));
// extra length
this.write(zipUtil.getShortBytes(extraLength));
this.write(zipUtil.getShortBytes(extra.length));

@@ -303,0 +309,0 @@ // name

{
"name": "compress-commons",
"version": "0.1.4",
"version": "0.1.5",
"description": "a library that defines a common interface for working with archives within node",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/ctalkington/node-compress-commons",

@@ -1,2 +0,2 @@

# Compress Commons v0.1.4 [![Build Status](https://travis-ci.org/ctalkington/node-compress-commons.svg?branch=master)](https://travis-ci.org/ctalkington/node-compress-commons)
# Compress Commons v0.1.5 [![Build Status](https://travis-ci.org/ctalkington/node-compress-commons.svg?branch=master)](https://travis-ci.org/ctalkington/node-compress-commons)

@@ -3,0 +3,0 @@ Compress Commons is a library that defines a common interface for working with archives within node.

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