compress-commons
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -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. |
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
27781
722