Socket
Socket
Sign inDemoInstall

archiver

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

archiver - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

21

lib/modules/tar/index.js

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

var Transform = require('stream').Transform || require('readable-stream').Transform;
var zlib = require('zlib');

@@ -18,7 +19,13 @@ var headers = require('./headers');

recordSize: 512,
recordsPerBlock: 20
recordsPerBlock: 20,
gzip: false
});
if (typeof options.gzipOptions !== 'object') {
options.gzipOptions = {};
}
Transform.call(this, options);
this.compressor = false;
this.offset = 0;

@@ -29,2 +36,6 @@ this.files = [];

this.blockSize = options.recordsPerBlock * options.recordSize;
if (options.gzip) {
this.compressor = zlib.createGzip(options.gzipOptions);
}
};

@@ -101,2 +112,10 @@

return Transform.prototype.write.call(this, chunk, cb);
};
Tar.prototype.pipe = function(destination, options) {
if (this.compressor) {
return Transform.prototype.pipe.call(this, this.compressor).pipe(destination, options);
} else {
return Transform.prototype.pipe.call(this, destination, options);
}
};

2

package.json
{
"name": "archiver",
"version": "0.6.1",
"version": "0.7.0",
"description": "Creates Archives (ZIP) via Node Streams.",

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

@@ -1,5 +0,7 @@

# Archiver v0.6.1 [![Build Status](https://secure.travis-ci.org/ctalkington/node-archiver.png?branch=master)](http://travis-ci.org/ctalkington/node-archiver)
# Archiver v0.7.0 [![Build Status](https://travis-ci.org/ctalkington/node-archiver.svg?branch=master)](https://travis-ci.org/ctalkington/node-archiver)
Creates Archives (Zip, Tar) via Node Streams.
[![NPM](https://nodei.co/npm/archiver.png)](https://nodei.co/npm/archiver/)
## Install

@@ -130,2 +132,10 @@

#### gzip `boolean`
Compresses the tar archive using gzip, default is false.
#### gzipOptions `object`
Passed to node's [zlib](http://nodejs.org/api/zlib.html#zlib_options) module to control compression. Options may vary by node version.
### File Data

@@ -132,0 +142,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc