You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by da...@apache.org on 2015/11/13 12:50:16 UTC

[12/13] cordova-firefoxos git commit: CB-9836 Add .gitattributes to prevent CRLF line endings in repos

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/README.md
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/README.md b/node_modules/archiver/node_modules/zip-stream/README.md
index f12fdcf..ec0501b 100644
--- a/node_modules/archiver/node_modules/zip-stream/README.md
+++ b/node_modules/archiver/node_modules/zip-stream/README.md
@@ -1,105 +1,105 @@
-# zip-stream v0.5.1 [![Build Status](https://travis-ci.org/archiverjs/node-zip-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-zip-stream)
-
-zip-stream is a streaming zip archive generator based on the `ZipArchiveOutputStream` prototype found in the [compress-commons](https://www.npmjs.org/package/compress-commons) project.
-
-It was originally created to be a successor to [zipstream](https://npmjs.org/package/zipstream).
-
-[![NPM](https://nodei.co/npm/zip-stream.png)](https://nodei.co/npm/zip-stream/)
-
-### Install
-
-```bash
-npm install zip-stream --save
-```
-
-You can also use `npm install https://github.com/archiverjs/node-zip-stream/archive/master.tar.gz` to test upcoming versions.
-
-### Usage
-
-This module is meant to be wrapped internally by other modules and therefore lacks any queue management. This means you have to wait until the previous entry has been fully consumed to add another. Nested callbacks should be used to add multiple entries. There are modules like [async](https://npmjs.org/package/async) that ease the so called "callback hell".
-
-If you want a module that handles entry queueing and much more, you should check out [archiver](https://npmjs.org/package/archiver) which uses this module internally.
-
-```js
-var packer = require('zip-stream');
-var archive = new packer(); // OR new packer(options)
-
-archive.on('error', function(err) {
-  throw err;
-});
-
-// pipe archive where you want it (ie fs, http, etc)
-// listen to the destination's end, close, or finish event
-
-archive.entry('string contents', { name: 'string.txt' }, function(err, entry) {
-  if (err) throw err;
-  archive.entry(null, { name: 'directory/' }, function(err, entry) {
-    if (err) throw err;
-    archive.finish();
-  });
-});
-```
-
-### Instance API
-
-#### getBytesWritten()
-
-Returns the current number of bytes written to this stream.
-
-#### entry(input, data, callback(err, data))
-
-Appends an input source (text string, buffer, or stream) to the instance. When the instance has received, processed, and emitted the input, the callback is fired.
-
-#### finish()
-
-Finalizes the instance. You should listen to the destination stream's `end`/`close`/`finish` event to know when all output has been safely consumed. (`finalize` is aliased for back-compat)
-
-### Instance Options
-
-#### comment `string`
-
-Sets the zip comment.
-
-#### store `boolean`
-
-If true, all entry contents will be archived without compression by default.
-
-#### zlib `object`
-
-Passed to node's [zlib](http://nodejs.org/api/zlib.html#zlib_options) module to control compression. Options may vary by node version.
-
-### Entry Data
-
-#### name `string` `required`
-
-Sets the entry name including internal path.
-
-#### type `string`
-
-Sets the entry type. Defaults to `file` or `directory` if name ends with trailing slash.
-
-#### date `string|Date`
-
-Sets the entry date. This can be any valid date string or instance. Defaults to current time in locale.
-
-#### store `boolean`
-
-If true, entry contents will be archived without compression.
-
-#### comment `string`
-
-Sets the entry comment.
-
-#### mode `number`
-
-Sets the entry permissions.
-
-## Things of Interest
-
-- [Releases](https://github.com/archiverjs/node-zip-stream/releases)
-- [Contributing](https://github.com/archiverjs/node-zip-stream/blob/master/CONTRIBUTING.md)
-- [MIT License](https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE-MIT)
-
-## Credits
-
+# zip-stream v0.5.1 [![Build Status](https://travis-ci.org/archiverjs/node-zip-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-zip-stream)
+
+zip-stream is a streaming zip archive generator based on the `ZipArchiveOutputStream` prototype found in the [compress-commons](https://www.npmjs.org/package/compress-commons) project.
+
+It was originally created to be a successor to [zipstream](https://npmjs.org/package/zipstream).
+
+[![NPM](https://nodei.co/npm/zip-stream.png)](https://nodei.co/npm/zip-stream/)
+
+### Install
+
+```bash
+npm install zip-stream --save
+```
+
+You can also use `npm install https://github.com/archiverjs/node-zip-stream/archive/master.tar.gz` to test upcoming versions.
+
+### Usage
+
+This module is meant to be wrapped internally by other modules and therefore lacks any queue management. This means you have to wait until the previous entry has been fully consumed to add another. Nested callbacks should be used to add multiple entries. There are modules like [async](https://npmjs.org/package/async) that ease the so called "callback hell".
+
+If you want a module that handles entry queueing and much more, you should check out [archiver](https://npmjs.org/package/archiver) which uses this module internally.
+
+```js
+var packer = require('zip-stream');
+var archive = new packer(); // OR new packer(options)
+
+archive.on('error', function(err) {
+  throw err;
+});
+
+// pipe archive where you want it (ie fs, http, etc)
+// listen to the destination's end, close, or finish event
+
+archive.entry('string contents', { name: 'string.txt' }, function(err, entry) {
+  if (err) throw err;
+  archive.entry(null, { name: 'directory/' }, function(err, entry) {
+    if (err) throw err;
+    archive.finish();
+  });
+});
+```
+
+### Instance API
+
+#### getBytesWritten()
+
+Returns the current number of bytes written to this stream.
+
+#### entry(input, data, callback(err, data))
+
+Appends an input source (text string, buffer, or stream) to the instance. When the instance has received, processed, and emitted the input, the callback is fired.
+
+#### finish()
+
+Finalizes the instance. You should listen to the destination stream's `end`/`close`/`finish` event to know when all output has been safely consumed. (`finalize` is aliased for back-compat)
+
+### Instance Options
+
+#### comment `string`
+
+Sets the zip comment.
+
+#### store `boolean`
+
+If true, all entry contents will be archived without compression by default.
+
+#### zlib `object`
+
+Passed to node's [zlib](http://nodejs.org/api/zlib.html#zlib_options) module to control compression. Options may vary by node version.
+
+### Entry Data
+
+#### name `string` `required`
+
+Sets the entry name including internal path.
+
+#### type `string`
+
+Sets the entry type. Defaults to `file` or `directory` if name ends with trailing slash.
+
+#### date `string|Date`
+
+Sets the entry date. This can be any valid date string or instance. Defaults to current time in locale.
+
+#### store `boolean`
+
+If true, entry contents will be archived without compression.
+
+#### comment `string`
+
+Sets the entry comment.
+
+#### mode `number`
+
+Sets the entry permissions.
+
+## Things of Interest
+
+- [Releases](https://github.com/archiverjs/node-zip-stream/releases)
+- [Contributing](https://github.com/archiverjs/node-zip-stream/blob/master/CONTRIBUTING.md)
+- [MIT License](https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE-MIT)
+
+## Credits
+
 Concept inspired by Antoine van Wel's [zipstream](https://npmjs.org/package/zipstream) module, which is no longer being updated.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/lib/util/index.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/lib/util/index.js b/node_modules/archiver/node_modules/zip-stream/lib/util/index.js
index 35aedfd..c8b3f73 100644
--- a/node_modules/archiver/node_modules/zip-stream/lib/util/index.js
+++ b/node_modules/archiver/node_modules/zip-stream/lib/util/index.js
@@ -1,103 +1,103 @@
-/**
- * node-zip-stream
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE-MIT
- */
-var fs = require('fs');
-var path = require('path');
-
-var Stream = require('stream').Stream;
-var PassThrough = require('readable-stream').PassThrough;
-
-var _ = require('lodash');
-
-var util = module.exports = {};
-
-util.convertDateTimeDos = function(input) {
-  return new Date(
-    ((input >> 25) & 0x7f) + 1980,
-    ((input >> 21) & 0x0f) - 1,
-    (input >> 16) & 0x1f,
-    (input >> 11) & 0x1f,
-    (input >> 5) & 0x3f,
-    (input & 0x1f) << 1
-  );
-};
-
-util.dateify = function(dateish) {
-  dateish = dateish || new Date();
-
-  if (dateish instanceof Date) {
-    dateish = dateish;
-  } else if (typeof dateish === 'string') {
-    dateish = new Date(dateish);
-  } else {
-    dateish = new Date();
-  }
-
-  return dateish;
-};
-
-// this is slightly different from lodash version
-util.defaults = function(object, source, guard) {
-  var args = arguments;
-  args[0] = args[0] || {};
-
-  return _.defaults.apply(_, args);
-};
-
-util.dosDateTime = function(d, utc) {
-  d = (d instanceof Date) ? d : util.dateify(d);
-  utc = utc || false;
-
-  var year = utc ? d.getUTCFullYear() : d.getFullYear();
-
-  if (year < 1980) {
-    return 2162688; // 1980-1-1 00:00:00
-  } else if (year >= 2044) {
-    return 2141175677; // 2043-12-31 23:59:58
-  }
-
-  var val = {
-    year: year,
-    month: utc ? d.getUTCMonth() : d.getMonth(),
-    date: utc ? d.getUTCDate() : d.getDate(),
-    hours: utc ? d.getUTCHours() : d.getHours(),
-    minutes: utc ? d.getUTCMinutes() : d.getMinutes(),
-    seconds: utc ? d.getUTCSeconds() : d.getSeconds()
-  };
-
-  return ((val.year-1980) << 25) | ((val.month+1) << 21) | (val.date << 16) |
-    (val.hours << 11) | (val.minutes << 5) | (val.seconds / 2);
-};
-
-util.isStream = function(source) {
-  return source instanceof Stream;
-};
-
-util.normalizeInputSource = function(source) {
-  if (source === null) {
-    return new Buffer(0);
-  } else if (typeof source === 'string') {
-    return new Buffer(source);
-  } else if (util.isStream(source) && !source._readableState) {
-    var normalized = new PassThrough();
-    source.pipe(normalized);
-
-    return normalized;
-  }
-
-  return source;
-};
-
-util.sanitizePath = function() {
-  var filepath = path.join.apply(path, arguments);
-  return filepath.replace(/\\/g, '/').replace(/:/g, '').replace(/^\/+/, '');
-};
-
-util.unixifyPath = function() {
-  var filepath = path.join.apply(path, arguments);
-  return filepath.replace(/\\/g, '/');
+/**
+ * node-zip-stream
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE-MIT
+ */
+var fs = require('fs');
+var path = require('path');
+
+var Stream = require('stream').Stream;
+var PassThrough = require('readable-stream').PassThrough;
+
+var _ = require('lodash');
+
+var util = module.exports = {};
+
+util.convertDateTimeDos = function(input) {
+  return new Date(
+    ((input >> 25) & 0x7f) + 1980,
+    ((input >> 21) & 0x0f) - 1,
+    (input >> 16) & 0x1f,
+    (input >> 11) & 0x1f,
+    (input >> 5) & 0x3f,
+    (input & 0x1f) << 1
+  );
+};
+
+util.dateify = function(dateish) {
+  dateish = dateish || new Date();
+
+  if (dateish instanceof Date) {
+    dateish = dateish;
+  } else if (typeof dateish === 'string') {
+    dateish = new Date(dateish);
+  } else {
+    dateish = new Date();
+  }
+
+  return dateish;
+};
+
+// this is slightly different from lodash version
+util.defaults = function(object, source, guard) {
+  var args = arguments;
+  args[0] = args[0] || {};
+
+  return _.defaults.apply(_, args);
+};
+
+util.dosDateTime = function(d, utc) {
+  d = (d instanceof Date) ? d : util.dateify(d);
+  utc = utc || false;
+
+  var year = utc ? d.getUTCFullYear() : d.getFullYear();
+
+  if (year < 1980) {
+    return 2162688; // 1980-1-1 00:00:00
+  } else if (year >= 2044) {
+    return 2141175677; // 2043-12-31 23:59:58
+  }
+
+  var val = {
+    year: year,
+    month: utc ? d.getUTCMonth() : d.getMonth(),
+    date: utc ? d.getUTCDate() : d.getDate(),
+    hours: utc ? d.getUTCHours() : d.getHours(),
+    minutes: utc ? d.getUTCMinutes() : d.getMinutes(),
+    seconds: utc ? d.getUTCSeconds() : d.getSeconds()
+  };
+
+  return ((val.year-1980) << 25) | ((val.month+1) << 21) | (val.date << 16) |
+    (val.hours << 11) | (val.minutes << 5) | (val.seconds / 2);
+};
+
+util.isStream = function(source) {
+  return source instanceof Stream;
+};
+
+util.normalizeInputSource = function(source) {
+  if (source === null) {
+    return new Buffer(0);
+  } else if (typeof source === 'string') {
+    return new Buffer(source);
+  } else if (util.isStream(source) && !source._readableState) {
+    var normalized = new PassThrough();
+    source.pipe(normalized);
+
+    return normalized;
+  }
+
+  return source;
+};
+
+util.sanitizePath = function() {
+  var filepath = path.join.apply(path, arguments);
+  return filepath.replace(/\\/g, '/').replace(/:/g, '').replace(/^\/+/, '');
+};
+
+util.unixifyPath = function() {
+  var filepath = path.join.apply(path, arguments);
+  return filepath.replace(/\\/g, '/');
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/lib/zip-stream.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/lib/zip-stream.js b/node_modules/archiver/node_modules/zip-stream/lib/zip-stream.js
index cd64d8f..358567e 100644
--- a/node_modules/archiver/node_modules/zip-stream/lib/zip-stream.js
+++ b/node_modules/archiver/node_modules/zip-stream/lib/zip-stream.js
@@ -1,110 +1,110 @@
-/**
- * node-zip-stream
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE-MIT
- */
-var inherits = require('util').inherits;
-
-var ZipArchiveOutputStream = require('compress-commons').ZipArchiveOutputStream;
-var ZipArchiveEntry = require('compress-commons').ZipArchiveEntry;
-
-var util = require('./util');
-
-var ZipStream = module.exports = function(options) {
-  if (!(this instanceof ZipStream)) {
-    return new ZipStream(options);
-  }
-
-  options = this.options = options || {};
-  options.zlib = options.zlib || {};
-
-  ZipArchiveOutputStream.call(this, options);
-
-  if (typeof options.level === 'number' && options.level >= 0) {
-    options.zlib.level = options.level;
-    delete options.level;
-  }
-
-  if (options.zlib.level && options.zlib.level === 0) {
-    options.store = true;
-  }
-
-  if (options.comment && options.comment.length > 0) {
-    this.setComment(options.comment);
-  }
-};
-
-inherits(ZipStream, ZipArchiveOutputStream);
-
-ZipStream.prototype._normalizeFileData = function(data) {
-  data = util.defaults(data, {
-    type: 'file',
-    name: null,
-    date: null,
-    mode: null,
-    store: this.options.store,
-    comment: ''
-  });
-
-  var isDir = data.type === 'directory';
-
-  if (data.name) {
-    data.name = util.sanitizePath(data.name);
-
-    if (data.name.slice(-1) === '/') {
-      isDir = true;
-      data.type = 'directory';
-    } else if (isDir) {
-      data.name += '/';
-    }
-  }
-
-  if (isDir) {
-    data.store = true;
-  }
-
-  data.date = util.dateify(data.date);
-
-  return data;
-};
-
-ZipStream.prototype.entry = function(source, data, callback) {
-  if (typeof callback !== 'function') {
-    callback = this._emitErrorCallback.bind(this);
-  }
-
-  data = this._normalizeFileData(data);
-
-  if (data.type !== 'file' && data.type !== 'directory') {
-    callback(new Error(data.type + ' entries not currently supported'));
-    return;
-  }
-
-  if (typeof data.name !== 'string' || data.name.length === 0) {
-    callback(new Error('entry name must be a non-empty string value'));
-    return;
-  }
-
-  var entry = new ZipArchiveEntry(data.name);
-  entry.setTime(data.date);
-
-  if (data.store) {
-    entry.setMethod(0);
-  }
-
-  if (data.comment.length > 0) {
-    entry.setComment(data.comment);
-  }
-
-  if (typeof data.mode === 'number') {
-    entry.setUnixMode(data.mode);
-  }
-
-  return ZipArchiveOutputStream.prototype.entry.call(this, entry, source, callback);
-};
-
-ZipStream.prototype.finalize = function() {
-  this.finish();
+/**
+ * node-zip-stream
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE-MIT
+ */
+var inherits = require('util').inherits;
+
+var ZipArchiveOutputStream = require('compress-commons').ZipArchiveOutputStream;
+var ZipArchiveEntry = require('compress-commons').ZipArchiveEntry;
+
+var util = require('./util');
+
+var ZipStream = module.exports = function(options) {
+  if (!(this instanceof ZipStream)) {
+    return new ZipStream(options);
+  }
+
+  options = this.options = options || {};
+  options.zlib = options.zlib || {};
+
+  ZipArchiveOutputStream.call(this, options);
+
+  if (typeof options.level === 'number' && options.level >= 0) {
+    options.zlib.level = options.level;
+    delete options.level;
+  }
+
+  if (options.zlib.level && options.zlib.level === 0) {
+    options.store = true;
+  }
+
+  if (options.comment && options.comment.length > 0) {
+    this.setComment(options.comment);
+  }
+};
+
+inherits(ZipStream, ZipArchiveOutputStream);
+
+ZipStream.prototype._normalizeFileData = function(data) {
+  data = util.defaults(data, {
+    type: 'file',
+    name: null,
+    date: null,
+    mode: null,
+    store: this.options.store,
+    comment: ''
+  });
+
+  var isDir = data.type === 'directory';
+
+  if (data.name) {
+    data.name = util.sanitizePath(data.name);
+
+    if (data.name.slice(-1) === '/') {
+      isDir = true;
+      data.type = 'directory';
+    } else if (isDir) {
+      data.name += '/';
+    }
+  }
+
+  if (isDir) {
+    data.store = true;
+  }
+
+  data.date = util.dateify(data.date);
+
+  return data;
+};
+
+ZipStream.prototype.entry = function(source, data, callback) {
+  if (typeof callback !== 'function') {
+    callback = this._emitErrorCallback.bind(this);
+  }
+
+  data = this._normalizeFileData(data);
+
+  if (data.type !== 'file' && data.type !== 'directory') {
+    callback(new Error(data.type + ' entries not currently supported'));
+    return;
+  }
+
+  if (typeof data.name !== 'string' || data.name.length === 0) {
+    callback(new Error('entry name must be a non-empty string value'));
+    return;
+  }
+
+  var entry = new ZipArchiveEntry(data.name);
+  entry.setTime(data.date);
+
+  if (data.store) {
+    entry.setMethod(0);
+  }
+
+  if (data.comment.length > 0) {
+    entry.setComment(data.comment);
+  }
+
+  if (typeof data.mode === 'number') {
+    entry.setUnixMode(data.mode);
+  }
+
+  return ZipArchiveOutputStream.prototype.entry.call(this, entry, source, callback);
+};
+
+ZipStream.prototype.finalize = function() {
+  this.finish();
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/LICENSE-MIT
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/LICENSE-MIT b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/LICENSE-MIT
index 819b403..56420a6 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/LICENSE-MIT
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/LICENSE-MIT
@@ -1,22 +1,22 @@
-Copyright (c) 2014 Chris Talkington, contributors.
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+Copyright (c) 2014 Chris Talkington, contributors.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/README.md
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/README.md b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/README.md
index 0124a0e..145d46d 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/README.md
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/README.md
@@ -1,25 +1,25 @@
-# Compress Commons v0.2.7 [![Build Status](https://travis-ci.org/archiverjs/node-compress-commons.svg?branch=master)](https://travis-ci.org/archiverjs/node-compress-commons)
-
-Compress Commons is a library that defines a common interface for working with archive formats within node.
-
-[![NPM](https://nodei.co/npm/compress-commons.png)](https://nodei.co/npm/compress-commons/)
-
-## Install
-
-```bash
-npm install compress-commons --save
-```
-
-You can also use `npm install https://github.com/archiverjs/node-compress-commons/archive/master.tar.gz` to test upcoming versions.
-
-## Things of Interest
-
-- [Changelog](https://github.com/archiverjs/node-compress-commons/releases)
-- [Contributing](https://github.com/archiverjs/node-compress-commons/blob/master/CONTRIBUTING.md)
-- [MIT License](https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT)
-
-## Credits
-
-Concept inspired by [Apache Commons Compress](http://commons.apache.org/proper/commons-compress/)&trade;.
-
+# Compress Commons v0.2.7 [![Build Status](https://travis-ci.org/archiverjs/node-compress-commons.svg?branch=master)](https://travis-ci.org/archiverjs/node-compress-commons)
+
+Compress Commons is a library that defines a common interface for working with archive formats within node.
+
+[![NPM](https://nodei.co/npm/compress-commons.png)](https://nodei.co/npm/compress-commons/)
+
+## Install
+
+```bash
+npm install compress-commons --save
+```
+
+You can also use `npm install https://github.com/archiverjs/node-compress-commons/archive/master.tar.gz` to test upcoming versions.
+
+## Things of Interest
+
+- [Changelog](https://github.com/archiverjs/node-compress-commons/releases)
+- [Contributing](https://github.com/archiverjs/node-compress-commons/blob/master/CONTRIBUTING.md)
+- [MIT License](https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT)
+
+## Credits
+
+Concept inspired by [Apache Commons Compress](http://commons.apache.org/proper/commons-compress/)&trade;.
+
 Some logic derived from [Apache Commons Compress](http://commons.apache.org/proper/commons-compress/)&trade; and [OpenJDK 7](http://openjdk.java.net/).
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-entry.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-entry.js b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-entry.js
index 3c6f8b8..4985e2c 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-entry.js
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-entry.js
@@ -1,16 +1,16 @@
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
- */
-var ArchiveEntry = module.exports = function() {};
-
-ArchiveEntry.prototype.getName = function() {};
-
-ArchiveEntry.prototype.getSize = function() {};
-
-ArchiveEntry.prototype.getLastModifiedDate = function() {};
-
+/**
+ * node-compress-commons
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
+ */
+var ArchiveEntry = module.exports = function() {};
+
+ArchiveEntry.prototype.getName = function() {};
+
+ArchiveEntry.prototype.getSize = function() {};
+
+ArchiveEntry.prototype.getLastModifiedDate = function() {};
+
 ArchiveEntry.prototype.isDirectory = function() {};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-output-stream.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-output-stream.js b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-output-stream.js
index b2325bc..8a3233a 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-output-stream.js
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-output-stream.js
@@ -1,118 +1,118 @@
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
- */
-var inherits = require('util').inherits;
-var Transform = require('readable-stream').Transform;
-
-var ArchiveEntry = require('./archive-entry');
-var util = require('../util');
-
-var ArchiveOutputStream = module.exports = function(options) {
-  if (!(this instanceof ArchiveOutputStream)) {
-    return new ArchiveOutputStream(options);
-  }
-
-  Transform.call(this, options);
-
-  this.offset = 0;
-  this._archive = {
-    finish: false,
-    finished: false,
-    processing: false
-  };
-};
-
-inherits(ArchiveOutputStream, Transform);
-
-ArchiveOutputStream.prototype._appendBuffer = function(zae, source, callback) {
-  // scaffold only
-};
-
-ArchiveOutputStream.prototype._appendStream = function(zae, source, callback) {
-  // scaffold only
-};
-
-ArchiveOutputStream.prototype._emitErrorCallback = function(err) {
-  if (err) {
-    this.emit('error', err);
-  }
-};
-
-ArchiveOutputStream.prototype._finish = function(ae) {
-  // scaffold only
-};
-
-ArchiveOutputStream.prototype._normalizeEntry = function(ae) {
-  // scaffold only
-};
-
-ArchiveOutputStream.prototype._transform = function(chunk, encoding, callback) {
-  callback(null, chunk);
-};
-
-ArchiveOutputStream.prototype.entry = function(ae, source, callback) {
-  source = source || null;
-
-  if (typeof callback !== 'function') {
-    callback = this._emitErrorCallback.bind(this);
-  }
-
-  if (!(ae instanceof ArchiveEntry)) {
-    callback(new Error('not a valid instance of ArchiveEntry'));
-    return;
-  }
-
-  if (this._archive.finish || this._archive.finished) {
-    callback(new Error('unacceptable entry after finish'));
-    return;
-  }
-
-  if (this._archive.processing) {
-    callback(new Error('already processing an entry'));
-    return;
-  }
-
-  this._archive.processing = true;
-  this._normalizeEntry(ae);
-  this._entry = ae;
-
-  source = util.normalizeInputSource(source);
-
-  if (Buffer.isBuffer(source)) {
-    this._appendBuffer(ae, source, callback);
-  } else if (util.isStream(source)) {
-    source.on('error', callback);
-    this._appendStream(ae, source, callback);
-  } else {
-    this._archive.processing = false;
-    callback(new Error('input source must be valid Stream or Buffer instance'));
-    return;
-  }
-
-  return this;
-};
-
-ArchiveOutputStream.prototype.finish = function() {
-  if (this._archive.processing) {
-    this._archive.finish = true;
-    return;
-  }
-
-  this._finish();
-};
-
-ArchiveOutputStream.prototype.getBytesWritten = function() {
-  return this.offset;
-};
-
-ArchiveOutputStream.prototype.write = function(chunk, cb) {
-  if (chunk) {
-    this.offset += chunk.length;
-  }
-
-  return Transform.prototype.write.call(this, chunk, cb);
+/**
+ * node-compress-commons
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
+ */
+var inherits = require('util').inherits;
+var Transform = require('readable-stream').Transform;
+
+var ArchiveEntry = require('./archive-entry');
+var util = require('../util');
+
+var ArchiveOutputStream = module.exports = function(options) {
+  if (!(this instanceof ArchiveOutputStream)) {
+    return new ArchiveOutputStream(options);
+  }
+
+  Transform.call(this, options);
+
+  this.offset = 0;
+  this._archive = {
+    finish: false,
+    finished: false,
+    processing: false
+  };
+};
+
+inherits(ArchiveOutputStream, Transform);
+
+ArchiveOutputStream.prototype._appendBuffer = function(zae, source, callback) {
+  // scaffold only
+};
+
+ArchiveOutputStream.prototype._appendStream = function(zae, source, callback) {
+  // scaffold only
+};
+
+ArchiveOutputStream.prototype._emitErrorCallback = function(err) {
+  if (err) {
+    this.emit('error', err);
+  }
+};
+
+ArchiveOutputStream.prototype._finish = function(ae) {
+  // scaffold only
+};
+
+ArchiveOutputStream.prototype._normalizeEntry = function(ae) {
+  // scaffold only
+};
+
+ArchiveOutputStream.prototype._transform = function(chunk, encoding, callback) {
+  callback(null, chunk);
+};
+
+ArchiveOutputStream.prototype.entry = function(ae, source, callback) {
+  source = source || null;
+
+  if (typeof callback !== 'function') {
+    callback = this._emitErrorCallback.bind(this);
+  }
+
+  if (!(ae instanceof ArchiveEntry)) {
+    callback(new Error('not a valid instance of ArchiveEntry'));
+    return;
+  }
+
+  if (this._archive.finish || this._archive.finished) {
+    callback(new Error('unacceptable entry after finish'));
+    return;
+  }
+
+  if (this._archive.processing) {
+    callback(new Error('already processing an entry'));
+    return;
+  }
+
+  this._archive.processing = true;
+  this._normalizeEntry(ae);
+  this._entry = ae;
+
+  source = util.normalizeInputSource(source);
+
+  if (Buffer.isBuffer(source)) {
+    this._appendBuffer(ae, source, callback);
+  } else if (util.isStream(source)) {
+    source.on('error', callback);
+    this._appendStream(ae, source, callback);
+  } else {
+    this._archive.processing = false;
+    callback(new Error('input source must be valid Stream or Buffer instance'));
+    return;
+  }
+
+  return this;
+};
+
+ArchiveOutputStream.prototype.finish = function() {
+  if (this._archive.processing) {
+    this._archive.finish = true;
+    return;
+  }
+
+  this._finish();
+};
+
+ArchiveOutputStream.prototype.getBytesWritten = function() {
+  return this.offset;
+};
+
+ArchiveOutputStream.prototype.write = function(chunk, cb) {
+  if (chunk) {
+    this.offset += chunk.length;
+  }
+
+  return Transform.prototype.write.call(this, chunk, cb);
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/constants.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/constants.js b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/constants.js
index 2514645..d82778f 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/constants.js
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/constants.js
@@ -1,71 +1,71 @@
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
- */
-module.exports = {
-  WORD: 4,
-  DWORD: 8,
-  EMPTY: new Buffer(0),
-
-  SHORT: 2,
-  SHORT_MASK: 0xffff,
-  SHORT_SHIFT: 16,
-  SHORT_ZERO: new Buffer(Array(2)),
-  LONG: 4,
-  LONG_ZERO: new Buffer(Array(4)),
-
-  MIN_VERSION_INITIAL: 10,
-  MIN_VERSION_DATA_DESCRIPTOR: 20,
-  MIN_VERSION_ZIP64: 45,
-  VERSION_MADEBY: 45,
-
-  METHOD_STORED: 0,
-  METHOD_DEFLATED: 8,
-
-  PLATFORM_UNIX: 3,
-  PLATFORM_FAT: 0,
-
-  SIG_LFH: 0x04034b50,
-  SIG_DD: 0x08074b50,
-  SIG_CFH: 0x02014b50,
-  SIG_EOCD: 0x06054b50,
-  SIG_ZIP64_EOCD: 0x06064B50,
-  SIG_ZIP64_EOCD_LOC: 0x07064B50,
-
-  ZIP64_MAGIC_SHORT: 0xffff,
-  ZIP64_MAGIC: 0xffffffff,
-  ZIP64_EXTRA_ID: 0x0001,
-
-  ZLIB_NO_COMPRESSION: 0,
-  ZLIB_BEST_SPEED: 1,
-  ZLIB_BEST_COMPRESSION: 9,
-  ZLIB_DEFAULT_COMPRESSION: -1,
-
-  MODE_MASK: 0xFFF,
-  DEFAULT_FILE_MODE: 0100644, // 644 -rw-r--r-- = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-  DEFAULT_DIR_MODE: 040755, // 755 drwxr-xr-x = S_IFDIR | S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
-
-  EXT_FILE_ATTR_DIR: 010173200020, // 755 drwxr-xr-x = (((S_IFDIR | 0755) << 16) | S_DOS_D)
-  EXT_FILE_ATTR_FILE: 020151000040, // 644 -rw-r--r-- = (((S_IFREG | 0644) << 16) | S_DOS_A) >>> 0
-
-  // Unix file types
-  S_IFMT: 0170000, // type of file mask  
-  S_IFIFO: 010000, // named pipe (fifo)
-  S_IFCHR: 020000, // character special
-  S_IFDIR: 040000, // directory
-  S_IFBLK: 060000, // block special
-  S_IFREG: 0100000, // regular
-  S_IFLNK: 0120000, // symbolic link
-  S_IFSOCK: 0140000, // socket
-
-  // DOS file type flags
-  S_DOS_A: 040, // Archive
-  S_DOS_D: 020, // Directory
-  S_DOS_V: 010, // Volume
-  S_DOS_S: 04, // System
-  S_DOS_H: 02, // Hidden
-  S_DOS_R: 01 // Read Only
+/**
+ * node-compress-commons
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
+ */
+module.exports = {
+  WORD: 4,
+  DWORD: 8,
+  EMPTY: new Buffer(0),
+
+  SHORT: 2,
+  SHORT_MASK: 0xffff,
+  SHORT_SHIFT: 16,
+  SHORT_ZERO: new Buffer(Array(2)),
+  LONG: 4,
+  LONG_ZERO: new Buffer(Array(4)),
+
+  MIN_VERSION_INITIAL: 10,
+  MIN_VERSION_DATA_DESCRIPTOR: 20,
+  MIN_VERSION_ZIP64: 45,
+  VERSION_MADEBY: 45,
+
+  METHOD_STORED: 0,
+  METHOD_DEFLATED: 8,
+
+  PLATFORM_UNIX: 3,
+  PLATFORM_FAT: 0,
+
+  SIG_LFH: 0x04034b50,
+  SIG_DD: 0x08074b50,
+  SIG_CFH: 0x02014b50,
+  SIG_EOCD: 0x06054b50,
+  SIG_ZIP64_EOCD: 0x06064B50,
+  SIG_ZIP64_EOCD_LOC: 0x07064B50,
+
+  ZIP64_MAGIC_SHORT: 0xffff,
+  ZIP64_MAGIC: 0xffffffff,
+  ZIP64_EXTRA_ID: 0x0001,
+
+  ZLIB_NO_COMPRESSION: 0,
+  ZLIB_BEST_SPEED: 1,
+  ZLIB_BEST_COMPRESSION: 9,
+  ZLIB_DEFAULT_COMPRESSION: -1,
+
+  MODE_MASK: 0xFFF,
+  DEFAULT_FILE_MODE: 0100644, // 644 -rw-r--r-- = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
+  DEFAULT_DIR_MODE: 040755, // 755 drwxr-xr-x = S_IFDIR | S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
+
+  EXT_FILE_ATTR_DIR: 010173200020, // 755 drwxr-xr-x = (((S_IFDIR | 0755) << 16) | S_DOS_D)
+  EXT_FILE_ATTR_FILE: 020151000040, // 644 -rw-r--r-- = (((S_IFREG | 0644) << 16) | S_DOS_A) >>> 0
+
+  // Unix file types
+  S_IFMT: 0170000, // type of file mask  
+  S_IFIFO: 010000, // named pipe (fifo)
+  S_IFCHR: 020000, // character special
+  S_IFDIR: 040000, // directory
+  S_IFBLK: 060000, // block special
+  S_IFREG: 0100000, // regular
+  S_IFLNK: 0120000, // symbolic link
+  S_IFSOCK: 0140000, // socket
+
+  // DOS file type flags
+  S_DOS_A: 040, // Archive
+  S_DOS_D: 020, // Directory
+  S_DOS_V: 010, // Volume
+  S_DOS_S: 04, // System
+  S_DOS_H: 02, // Hidden
+  S_DOS_R: 01 // Read Only
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js
index dc21073..96f3702 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js
@@ -1,101 +1,101 @@
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
- */
-var zipUtil = require('./util');
-
-var DATA_DESCRIPTOR_FLAG = 1 << 3;
-var ENCRYPTION_FLAG = 1 << 0;
-var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2;
-var SLIDING_DICTIONARY_SIZE_FLAG = 1 << 1;
-var STRONG_ENCRYPTION_FLAG = 1 << 6;
-var UFT8_NAMES_FLAG = 1 << 11;
-
-var GeneralPurposeBit = module.exports = function() {
-  if (!(this instanceof GeneralPurposeBit)) {
-    return new GeneralPurposeBit();
-  }
-
-  this.descriptor = false;
-  this.encryption = false;
-  this.utf8 = false;
-  this.numberOfShannonFanoTrees = 0;
-  this.strongEncryption = false;
-  this.slidingDictionarySize = 0;
-
-  return this;
-};
-
-GeneralPurposeBit.prototype.encode = function() {
-  return zipUtil.getShortBytes(
-    (this.descriptor ? DATA_DESCRIPTOR_FLAG : 0) |
-    (this.utf8 ? UFT8_NAMES_FLAG : 0) |
-    (this.encryption ? ENCRYPTION_FLAG : 0) |
-    (this.strongEncryption ? STRONG_ENCRYPTION_FLAG : 0)
-  );
-};
-
-GeneralPurposeBit.prototype.parse = function(buf, offset) {
-  var flag = zipUtil.getShortBytesValue(buf, offset);
-  var gbp = new GeneralPurposeBit();
-
-  gbp.useDataDescriptor((flag & DATA_DESCRIPTOR_FLAG) !== 0);
-  gbp.useUTF8ForNames((flag & UFT8_NAMES_FLAG) !== 0);
-  gbp.useStrongEncryption((flag & STRONG_ENCRYPTION_FLAG) !== 0);
-  gbp.useEncryption((flag & ENCRYPTION_FLAG) !== 0);
-  gbp.setSlidingDictionarySize((flag & SLIDING_DICTIONARY_SIZE_FLAG) !== 0 ? 8192 : 4096);
-  gbp.setNumberOfShannonFanoTrees((flag & NUMBER_OF_SHANNON_FANO_TREES_FLAG) !== 0 ? 3 : 2);
-
-  return gbp;
-};
-
-GeneralPurposeBit.prototype.setNumberOfShannonFanoTrees = function(n) {
-  this.numberOfShannonFanoTrees = n;
-};
-
-GeneralPurposeBit.prototype.getNumberOfShannonFanoTrees = function() {
-  return this.numberOfShannonFanoTrees;
-};
-
-GeneralPurposeBit.prototype.setSlidingDictionarySize = function(n) {
-  this.slidingDictionarySize = n;
-};
-
-GeneralPurposeBit.prototype.getSlidingDictionarySize = function() {
-  return this.slidingDictionarySize;
-};
-
-GeneralPurposeBit.prototype.useDataDescriptor = function(b) {
-  this.descriptor = b;
-};
-
-GeneralPurposeBit.prototype.usesDataDescriptor = function() {
-  return this.descriptor;
-};
-
-GeneralPurposeBit.prototype.useEncryption = function(b) {
-  this.encryption = b;
-};
-
-GeneralPurposeBit.prototype.usesEncryption = function() {
-  return this.encryption;
-};
-
-GeneralPurposeBit.prototype.useStrongEncryption = function(b) {
-  this.strongEncryption = b;
-};
-
-GeneralPurposeBit.prototype.usesStrongEncryption = function() {
-  return this.strongEncryption;
-};
-
-GeneralPurposeBit.prototype.useUTF8ForNames = function(b) {
-  this.utf8 = b;
-};
-
-GeneralPurposeBit.prototype.usesUTF8ForNames = function() {
-  return this.utf8;
+/**
+ * node-compress-commons
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
+ */
+var zipUtil = require('./util');
+
+var DATA_DESCRIPTOR_FLAG = 1 << 3;
+var ENCRYPTION_FLAG = 1 << 0;
+var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2;
+var SLIDING_DICTIONARY_SIZE_FLAG = 1 << 1;
+var STRONG_ENCRYPTION_FLAG = 1 << 6;
+var UFT8_NAMES_FLAG = 1 << 11;
+
+var GeneralPurposeBit = module.exports = function() {
+  if (!(this instanceof GeneralPurposeBit)) {
+    return new GeneralPurposeBit();
+  }
+
+  this.descriptor = false;
+  this.encryption = false;
+  this.utf8 = false;
+  this.numberOfShannonFanoTrees = 0;
+  this.strongEncryption = false;
+  this.slidingDictionarySize = 0;
+
+  return this;
+};
+
+GeneralPurposeBit.prototype.encode = function() {
+  return zipUtil.getShortBytes(
+    (this.descriptor ? DATA_DESCRIPTOR_FLAG : 0) |
+    (this.utf8 ? UFT8_NAMES_FLAG : 0) |
+    (this.encryption ? ENCRYPTION_FLAG : 0) |
+    (this.strongEncryption ? STRONG_ENCRYPTION_FLAG : 0)
+  );
+};
+
+GeneralPurposeBit.prototype.parse = function(buf, offset) {
+  var flag = zipUtil.getShortBytesValue(buf, offset);
+  var gbp = new GeneralPurposeBit();
+
+  gbp.useDataDescriptor((flag & DATA_DESCRIPTOR_FLAG) !== 0);
+  gbp.useUTF8ForNames((flag & UFT8_NAMES_FLAG) !== 0);
+  gbp.useStrongEncryption((flag & STRONG_ENCRYPTION_FLAG) !== 0);
+  gbp.useEncryption((flag & ENCRYPTION_FLAG) !== 0);
+  gbp.setSlidingDictionarySize((flag & SLIDING_DICTIONARY_SIZE_FLAG) !== 0 ? 8192 : 4096);
+  gbp.setNumberOfShannonFanoTrees((flag & NUMBER_OF_SHANNON_FANO_TREES_FLAG) !== 0 ? 3 : 2);
+
+  return gbp;
+};
+
+GeneralPurposeBit.prototype.setNumberOfShannonFanoTrees = function(n) {
+  this.numberOfShannonFanoTrees = n;
+};
+
+GeneralPurposeBit.prototype.getNumberOfShannonFanoTrees = function() {
+  return this.numberOfShannonFanoTrees;
+};
+
+GeneralPurposeBit.prototype.setSlidingDictionarySize = function(n) {
+  this.slidingDictionarySize = n;
+};
+
+GeneralPurposeBit.prototype.getSlidingDictionarySize = function() {
+  return this.slidingDictionarySize;
+};
+
+GeneralPurposeBit.prototype.useDataDescriptor = function(b) {
+  this.descriptor = b;
+};
+
+GeneralPurposeBit.prototype.usesDataDescriptor = function() {
+  return this.descriptor;
+};
+
+GeneralPurposeBit.prototype.useEncryption = function(b) {
+  this.encryption = b;
+};
+
+GeneralPurposeBit.prototype.usesEncryption = function() {
+  return this.encryption;
+};
+
+GeneralPurposeBit.prototype.useStrongEncryption = function(b) {
+  this.strongEncryption = b;
+};
+
+GeneralPurposeBit.prototype.usesStrongEncryption = function() {
+  return this.strongEncryption;
+};
+
+GeneralPurposeBit.prototype.useUTF8ForNames = function(b) {
+  this.utf8 = b;
+};
+
+GeneralPurposeBit.prototype.usesUTF8ForNames = function() {
+  return this.utf8;
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/util.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/util.js b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/util.js
index 36c69a9..7fcab60 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/util.js
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/util.js
@@ -1,84 +1,84 @@
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
- */
-var Int64 = require('node-int64');
-var util = module.exports = {};
-
-util.dateToDos = function(d) {
-  var year = d.getFullYear();
-
-  if (year < 1980) {
-    return 2162688; // 1980-1-1 00:00:00
-  } else if (year >= 2044) {
-    return 2141175677; // 2043-12-31 23:59:58
-  }
-
-  var val = {
-    year: year,
-    month: d.getMonth(),
-    date: d.getDate(),
-    hours: d.getHours(),
-    minutes: d.getMinutes(),
-    seconds: d.getSeconds()
-  };
-
-  return ((val.year - 1980) << 25) | ((val.month + 1) << 21) | (val.date << 16) |
-    (val.hours << 11) | (val.minutes << 5) | (val.seconds / 2);
-};
-
-util.dosToDate = function(dos) {
-  return new Date(
-    ((dos >> 25) & 0x7f) + 1980,
-    ((dos >> 21) & 0x0f) - 1,
-    (dos >> 16) & 0x1f,
-    (dos >> 11) & 0x1f,
-    (dos >> 5) & 0x3f,
-    (dos & 0x1f) << 1
-  );
-};
-
-util.fromDosTime = function(buf) {
-  return util.dosToDate(buf.readUInt32LE());
-};
-
-util.getEightBytes = function(v) {
-  var buf = new Buffer(8);
-  var i64 = new Int64(v);
-
-  // BE to LE
-  for(i = 0; i < 8; i++) {
-    buf[i] = i64.buffer[7 - i];
-  }
-
-  return buf;
-};
-
-util.getShortBytes = function(v) {
-  var buf = new Buffer(2);
-  buf.writeUInt16LE(v, 0);
-
-  return buf;
-};
-
-util.getShortBytesValue = function(buf, offset) {
-  return buf.readUInt16LE(offset);
-};
-
-util.getLongBytes = function(v) {
-  var buf = new Buffer(4);
-  buf.writeUInt32LE(v, 0);
-
-  return buf;
-};
-
-util.getLongBytesValue = function(buf, offset) {
-  return buf.readUInt32LE(offset);
-};
-
-util.toDosTime = function(d) {
-  return util.getLongBytes(util.dateToDos(d));
+/**
+ * node-compress-commons
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
+ */
+var Int64 = require('node-int64');
+var util = module.exports = {};
+
+util.dateToDos = function(d) {
+  var year = d.getFullYear();
+
+  if (year < 1980) {
+    return 2162688; // 1980-1-1 00:00:00
+  } else if (year >= 2044) {
+    return 2141175677; // 2043-12-31 23:59:58
+  }
+
+  var val = {
+    year: year,
+    month: d.getMonth(),
+    date: d.getDate(),
+    hours: d.getHours(),
+    minutes: d.getMinutes(),
+    seconds: d.getSeconds()
+  };
+
+  return ((val.year - 1980) << 25) | ((val.month + 1) << 21) | (val.date << 16) |
+    (val.hours << 11) | (val.minutes << 5) | (val.seconds / 2);
+};
+
+util.dosToDate = function(dos) {
+  return new Date(
+    ((dos >> 25) & 0x7f) + 1980,
+    ((dos >> 21) & 0x0f) - 1,
+    (dos >> 16) & 0x1f,
+    (dos >> 11) & 0x1f,
+    (dos >> 5) & 0x3f,
+    (dos & 0x1f) << 1
+  );
+};
+
+util.fromDosTime = function(buf) {
+  return util.dosToDate(buf.readUInt32LE());
+};
+
+util.getEightBytes = function(v) {
+  var buf = new Buffer(8);
+  var i64 = new Int64(v);
+
+  // BE to LE
+  for(i = 0; i < 8; i++) {
+    buf[i] = i64.buffer[7 - i];
+  }
+
+  return buf;
+};
+
+util.getShortBytes = function(v) {
+  var buf = new Buffer(2);
+  buf.writeUInt16LE(v, 0);
+
+  return buf;
+};
+
+util.getShortBytesValue = function(buf, offset) {
+  return buf.readUInt16LE(offset);
+};
+
+util.getLongBytes = function(v) {
+  var buf = new Buffer(4);
+  buf.writeUInt32LE(v, 0);
+
+  return buf;
+};
+
+util.getLongBytesValue = function(buf, offset) {
+  return buf.readUInt32LE(offset);
+};
+
+util.toDosTime = function(d) {
+  return util.getLongBytes(util.dateToDos(d));
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
index 9eecf00..cffb826 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js
@@ -1,223 +1,223 @@
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
- */
-var inherits = require('util').inherits;
-
-var ArchiveEntry = require('../archive-entry');
-var GeneralPurposeBit = require('./general-purpose-bit');
-
-var constants = require('./constants');
-var zipUtil = require('./util');
-
-var ZipArchiveEntry = module.exports = function(name) {
-  if (!(this instanceof ZipArchiveEntry)) {
-    return new ZipArchiveEntry(name);
-  }
-
-  ArchiveEntry.call(this);
-
-  this.platform = constants.PLATFORM_FAT;
-  this.method = -1;
-
-  this.name = null;
-  this.size = -1;
-  this.csize = -1;
-  this.gpb = new GeneralPurposeBit();
-  this.crc = 0;
-  this.time = -1;
-
-  this.minver = constants.MIN_VERSION_INITIAL;
-  this.mode = -1;
-  this.extra = null;
-  this.exattr = 0;
-  this.inattr = 0;
-  this.comment = null;
-
-  if (name) {
-    this.setName(name);
-  }
-};
-
-inherits(ZipArchiveEntry, ArchiveEntry);
-
-ZipArchiveEntry.prototype.getCentralDirectoryExtra = function() {
-  return this.getExtra();
-};
-
-ZipArchiveEntry.prototype.getComment = function() {
-  return this.comment !== null ? this.comment : '';
-};
-
-ZipArchiveEntry.prototype.getCompressedSize = function() {
-  return this.csize;
-};
-
-ZipArchiveEntry.prototype.getCrc = function() {
-  return this.crc;
-};
-
-ZipArchiveEntry.prototype.getExternalAttributes = function() {
-  return this.exattr;
-};
-
-ZipArchiveEntry.prototype.getExtra = function() {
-  return this.extra !== null ? this.extra : constants.EMPTY;
-};
-
-ZipArchiveEntry.prototype.getGeneralPurposeBit = function() {
-  return this.gpb;
-};
-
-ZipArchiveEntry.prototype.getInternalAttributes = function() {
-  return this.inattr;
-};
-
-ZipArchiveEntry.prototype.getLastModifiedDate = function() {
-  return this.getTime();
-};
-
-ZipArchiveEntry.prototype.getLocalFileDataExtra = function() {
-  return this.getExtra();
-};
-
-ZipArchiveEntry.prototype.getMethod = function() {
-  return this.method;
-};
-
-ZipArchiveEntry.prototype.getName = function() {
-  return this.name;
-};
-
-ZipArchiveEntry.prototype.getPlatform = function() {
-  return this.platform;
-};
-
-ZipArchiveEntry.prototype.getSize = function() {
-  return this.size;
-};
-
-ZipArchiveEntry.prototype.getTime = function() {
-  return this.time !== -1 ? zipUtil.dosToDate(this.time) : -1;
-};
-
-ZipArchiveEntry.prototype.getTimeDos = function() {
-  return this.time !== -1 ? this.time : 0;
-};
-
-ZipArchiveEntry.prototype.getUnixMode = function() {
-  return this.platform !== constants.PLATFORM_UNIX ? 0 : ((this.getExternalAttributes() >> constants.SHORT_SHIFT) & constants.SHORT_MASK) & constants.MODE_MASK;
-};
-
-ZipArchiveEntry.prototype.getVersionNeededToExtract = function() {
-  return this.minver;
-};
-
-ZipArchiveEntry.prototype.setComment = function(comment) {
-  if (Buffer.byteLength(comment) !== comment.length) {
-    this.getGeneralPurposeBit().useUTF8ForNames(true);
-  }
-
-  this.comment = comment;
-};
-
-ZipArchiveEntry.prototype.setCompressedSize = function(size) {
-  if (size < 0) {
-    throw new Error('invalid entry compressed size');
-  }
-
-  this.csize = size;
-};
-
-ZipArchiveEntry.prototype.setCrc = function(crc) {
-  if (crc < 0) {
-    throw new Error('invalid entry crc32');
-  }
-
-  this.crc = crc;
-};
-
-ZipArchiveEntry.prototype.setExternalAttributes = function(attr) {
-  this.exattr = attr >>> 0;
-};
-
-ZipArchiveEntry.prototype.setExtra = function(extra) {
-  this.extra = extra;
-};
-
-ZipArchiveEntry.prototype.setGeneralPurposeBit = function(gpb) {
-  if (!(gpb instanceof GeneralPurposeBit)) {
-    throw new Error('invalid entry GeneralPurposeBit');
-  }
-
-  this.gpb = gpb;
-};
-
-ZipArchiveEntry.prototype.setInternalAttributes = function(attr) {
-  this.inattr = attr;
-};
-
-ZipArchiveEntry.prototype.setMethod = function(method) {
-  if (method < 0) {
-    throw new Error('invalid entry compression method');
-  }
-
-  this.method = method;
-};
-
-ZipArchiveEntry.prototype.setName = function(name) {
-  name = name.replace(/\\/g, '/').replace(/:/g, '').replace(/^\/+/, '');
-
-  if (Buffer.byteLength(name) !== name.length) {
-    this.getGeneralPurposeBit().useUTF8ForNames(true);
-  }
-
-  this.name = name;
-};
-
-ZipArchiveEntry.prototype.setPlatform = function(platform) {
-  this.platform = platform;
-};
-
-ZipArchiveEntry.prototype.setSize = function(size) {
-  if (size < 0) {
-    throw new Error('invalid entry size');
-  }
-
-  this.size = size;
-};
-
-ZipArchiveEntry.prototype.setTime = function(time) {
-  if (!(time instanceof Date)) {
-    throw new Error('invalid entry time');
-  }
-
-  this.time = zipUtil.dateToDos(time);
-};
-
-ZipArchiveEntry.prototype.setUnixMode = function(mode) {
-  mode &= ~constants.S_IFMT;
-  mode |= this.isDirectory() ? constants.S_IFDIR : constants.S_IFREG;
-
-  var extattr = 0;
-  extattr |= (mode << constants.SHORT_SHIFT) | (this.isDirectory() ? constants.S_DOS_D : constants.S_DOS_A);
-
-  this.setExternalAttributes(extattr);
-  this.mode = mode & constants.MODE_MASK;
-  this.platform = constants.PLATFORM_UNIX;
-};
-
-ZipArchiveEntry.prototype.setVersionNeededToExtract = function(minver) {
-  this.minver = minver;
-};
-
-ZipArchiveEntry.prototype.isDirectory = function() {
-  return this.getName().slice(-1) === '/';
-};
-
-ZipArchiveEntry.prototype.isZip64 = function() {
-  return this.csize > constants.ZIP64_MAGIC || this.size > constants.ZIP64_MAGIC;
+/**
+ * node-compress-commons
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
+ */
+var inherits = require('util').inherits;
+
+var ArchiveEntry = require('../archive-entry');
+var GeneralPurposeBit = require('./general-purpose-bit');
+
+var constants = require('./constants');
+var zipUtil = require('./util');
+
+var ZipArchiveEntry = module.exports = function(name) {
+  if (!(this instanceof ZipArchiveEntry)) {
+    return new ZipArchiveEntry(name);
+  }
+
+  ArchiveEntry.call(this);
+
+  this.platform = constants.PLATFORM_FAT;
+  this.method = -1;
+
+  this.name = null;
+  this.size = -1;
+  this.csize = -1;
+  this.gpb = new GeneralPurposeBit();
+  this.crc = 0;
+  this.time = -1;
+
+  this.minver = constants.MIN_VERSION_INITIAL;
+  this.mode = -1;
+  this.extra = null;
+  this.exattr = 0;
+  this.inattr = 0;
+  this.comment = null;
+
+  if (name) {
+    this.setName(name);
+  }
+};
+
+inherits(ZipArchiveEntry, ArchiveEntry);
+
+ZipArchiveEntry.prototype.getCentralDirectoryExtra = function() {
+  return this.getExtra();
+};
+
+ZipArchiveEntry.prototype.getComment = function() {
+  return this.comment !== null ? this.comment : '';
+};
+
+ZipArchiveEntry.prototype.getCompressedSize = function() {
+  return this.csize;
+};
+
+ZipArchiveEntry.prototype.getCrc = function() {
+  return this.crc;
+};
+
+ZipArchiveEntry.prototype.getExternalAttributes = function() {
+  return this.exattr;
+};
+
+ZipArchiveEntry.prototype.getExtra = function() {
+  return this.extra !== null ? this.extra : constants.EMPTY;
+};
+
+ZipArchiveEntry.prototype.getGeneralPurposeBit = function() {
+  return this.gpb;
+};
+
+ZipArchiveEntry.prototype.getInternalAttributes = function() {
+  return this.inattr;
+};
+
+ZipArchiveEntry.prototype.getLastModifiedDate = function() {
+  return this.getTime();
+};
+
+ZipArchiveEntry.prototype.getLocalFileDataExtra = function() {
+  return this.getExtra();
+};
+
+ZipArchiveEntry.prototype.getMethod = function() {
+  return this.method;
+};
+
+ZipArchiveEntry.prototype.getName = function() {
+  return this.name;
+};
+
+ZipArchiveEntry.prototype.getPlatform = function() {
+  return this.platform;
+};
+
+ZipArchiveEntry.prototype.getSize = function() {
+  return this.size;
+};
+
+ZipArchiveEntry.prototype.getTime = function() {
+  return this.time !== -1 ? zipUtil.dosToDate(this.time) : -1;
+};
+
+ZipArchiveEntry.prototype.getTimeDos = function() {
+  return this.time !== -1 ? this.time : 0;
+};
+
+ZipArchiveEntry.prototype.getUnixMode = function() {
+  return this.platform !== constants.PLATFORM_UNIX ? 0 : ((this.getExternalAttributes() >> constants.SHORT_SHIFT) & constants.SHORT_MASK) & constants.MODE_MASK;
+};
+
+ZipArchiveEntry.prototype.getVersionNeededToExtract = function() {
+  return this.minver;
+};
+
+ZipArchiveEntry.prototype.setComment = function(comment) {
+  if (Buffer.byteLength(comment) !== comment.length) {
+    this.getGeneralPurposeBit().useUTF8ForNames(true);
+  }
+
+  this.comment = comment;
+};
+
+ZipArchiveEntry.prototype.setCompressedSize = function(size) {
+  if (size < 0) {
+    throw new Error('invalid entry compressed size');
+  }
+
+  this.csize = size;
+};
+
+ZipArchiveEntry.prototype.setCrc = function(crc) {
+  if (crc < 0) {
+    throw new Error('invalid entry crc32');
+  }
+
+  this.crc = crc;
+};
+
+ZipArchiveEntry.prototype.setExternalAttributes = function(attr) {
+  this.exattr = attr >>> 0;
+};
+
+ZipArchiveEntry.prototype.setExtra = function(extra) {
+  this.extra = extra;
+};
+
+ZipArchiveEntry.prototype.setGeneralPurposeBit = function(gpb) {
+  if (!(gpb instanceof GeneralPurposeBit)) {
+    throw new Error('invalid entry GeneralPurposeBit');
+  }
+
+  this.gpb = gpb;
+};
+
+ZipArchiveEntry.prototype.setInternalAttributes = function(attr) {
+  this.inattr = attr;
+};
+
+ZipArchiveEntry.prototype.setMethod = function(method) {
+  if (method < 0) {
+    throw new Error('invalid entry compression method');
+  }
+
+  this.method = method;
+};
+
+ZipArchiveEntry.prototype.setName = function(name) {
+  name = name.replace(/\\/g, '/').replace(/:/g, '').replace(/^\/+/, '');
+
+  if (Buffer.byteLength(name) !== name.length) {
+    this.getGeneralPurposeBit().useUTF8ForNames(true);
+  }
+
+  this.name = name;
+};
+
+ZipArchiveEntry.prototype.setPlatform = function(platform) {
+  this.platform = platform;
+};
+
+ZipArchiveEntry.prototype.setSize = function(size) {
+  if (size < 0) {
+    throw new Error('invalid entry size');
+  }
+
+  this.size = size;
+};
+
+ZipArchiveEntry.prototype.setTime = function(time) {
+  if (!(time instanceof Date)) {
+    throw new Error('invalid entry time');
+  }
+
+  this.time = zipUtil.dateToDos(time);
+};
+
+ZipArchiveEntry.prototype.setUnixMode = function(mode) {
+  mode &= ~constants.S_IFMT;
+  mode |= this.isDirectory() ? constants.S_IFDIR : constants.S_IFREG;
+
+  var extattr = 0;
+  extattr |= (mode << constants.SHORT_SHIFT) | (this.isDirectory() ? constants.S_DOS_D : constants.S_DOS_A);
+
+  this.setExternalAttributes(extattr);
+  this.mode = mode & constants.MODE_MASK;
+  this.platform = constants.PLATFORM_UNIX;
+};
+
+ZipArchiveEntry.prototype.setVersionNeededToExtract = function(minver) {
+  this.minver = minver;
+};
+
+ZipArchiveEntry.prototype.isDirectory = function() {
+  return this.getName().slice(-1) === '/';
+};
+
+ZipArchiveEntry.prototype.isZip64 = function() {
+  return this.csize > constants.ZIP64_MAGIC || this.size > constants.ZIP64_MAGIC;
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
index e527875..1dea040 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js
@@ -1,427 +1,427 @@
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
- */
-var inherits = require('util').inherits;
-var crc32 = require('buffer-crc32');
-var CRC32Stream = require('crc32-stream');
-var DeflateCRC32Stream = CRC32Stream.DeflateCRC32Stream;
-
-var ArchiveOutputStream = require('../archive-output-stream');
-var ZipArchiveEntry = require('./zip-archive-entry');
-var GeneralPurposeBit = require('./general-purpose-bit');
-
-var constants = require('./constants');
-var util = require('../../util');
-var zipUtil = require('./util');
-
-var ZipArchiveOutputStream = module.exports = function(options) {
-  if (!(this instanceof ZipArchiveOutputStream)) {
-    return new ZipArchiveOutputStream(options);
-  }
-
-  options = this.options = this._defaults(options);
-
-  ArchiveOutputStream.call(this, options);
-
-  this._entry = null;
-  this._entries = [];
-  this._archive = {
-    centralLength: 0,
-    centralOffset: 0,
-    comment: '',
-    finish: false,
-    finished: false,
-    processing: false
-  };
-};
-
-inherits(ZipArchiveOutputStream, ArchiveOutputStream);
-
-ZipArchiveOutputStream.prototype._afterAppend = function(ae) {
-  this._entries.push(ae);
-
-  if (ae.getGeneralPurposeBit().usesDataDescriptor()) {
-    this._writeDataDescriptor(ae);
-  }
-
-  this._archive.processing = false;
-  this._entry = null;
-
-  if (this._archive.finish && !this._archive.finished) {
-    this._finish();
-  }
-};
-
-ZipArchiveOutputStream.prototype._appendBuffer = function(ae, source, callback) {
-  if (source.length === 0) {
-    ae.setMethod(constants.METHOD_STORED);
-  }
-
-  var method = ae.getMethod();
-
-  if (method === constants.METHOD_STORED) {
-    ae.setSize(source.length);
-    ae.setCompressedSize(source.length);
-    ae.setCrc(crc32.unsigned(source));
-  }
-
-  this._writeLocalFileHeader(ae);
-
-  if (method === constants.METHOD_STORED) {
-    this.write(source);
-    this._afterAppend(ae);
-    callback(null, ae);
-    return;
-  } else if (method === constants.METHOD_DEFLATED) {
-    this._smartStream(ae, callback).end(source);
-    return;
-  } else {
-    callback(new Error('compression method ' + method + ' not implemented'));
-    return;
-  }
-};
-
-ZipArchiveOutputStream.prototype._appendStream = function(ae, source, callback) {
-  ae.getGeneralPurposeBit().useDataDescriptor(true);
-  ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
-
-  this._writeLocalFileHeader(ae);
-
-  var smart = this._smartStream(ae, callback);
-  source.pipe(smart);
-};
-
-ZipArchiveOutputStream.prototype._defaults = function(o) {
-  if (typeof o !== 'object') {
-    o = {};
-  }
-
-  if (typeof o.zlib !== 'object') {
-    o.zlib = {};
-  }
-
-  if (typeof o.zlib.level !== 'number') {
-    o.zlib.level = constants.ZLIB_BEST_SPEED;
-  }
-
-  return o;
-};
-
-ZipArchiveOutputStream.prototype._finish = function() {
-  this._archive.centralOffset = this.offset;
-
-  this._entries.forEach(function(ae) {
-    this._writeCentralFileHeader(ae);
-  }.bind(this));
-
-  this._archive.centralLength = this.offset - this._archive.centralOffset;
-
-  if (this.isZip64()) {
-    this._writeCentralDirectoryZip64();
-  }
-
-  this._writeCentralDirectoryEnd();
-
-  this._archive.processing = false;
-  this._archive.finish = true;
-  this._archive.finished = true;
-  this.end();
-};
-
-ZipArchiveOutputStream.prototype._normalizeEntry = function(ae) {
-  if (ae.getMethod() === -1) {
-    ae.setMethod(constants.METHOD_DEFLATED);
-  }
-
-  if (ae.getMethod() === constants.METHOD_DEFLATED) {
-    ae.getGeneralPurposeBit().useDataDescriptor(true);
-    ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
-  }
-
-  if (ae.getTime() === -1) {
-    ae.setTime(new Date());
-  }
-
-  ae._offsets = {
-    file: 0,
-    data: 0,
-    contents: 0,
-  };
-};
-
-ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) {
-  var deflate = ae.getMethod() === constants.METHOD_DEFLATED;
-  var process = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream();
-
-  function handleStuff(err) {
-    ae.setCrc(process.digest());
-    ae.setSize(process.size());
-    ae.setCompressedSize(process.size(true));
-    this._afterAppend(ae);
-    callback(null, ae);
-  }
-
-  process.once('error', callback);
-  process.once('end', handleStuff.bind(this));
-
-  process.pipe(this, { end: false });
-
-  return process;
-};
-
-ZipArchiveOutputStream.prototype._writeCentralDirectoryEnd = function() {
-  var records = this._entries.length;
-  var size = this._archive.centralLength;
-  var offset = this._archive.centralOffset;
-
-  if (this.isZip64()) {
-    records = constants.ZIP64_MAGIC_SHORT;
-    size = constants.ZIP64_MAGIC;
-    offset = constants.ZIP64_MAGIC;
-  }
-
-  // signature
-  this.write(zipUtil.getLongBytes(constants.SIG_EOCD));
-
-  // disk numbers
-  this.write(constants.SHORT_ZERO);
-  this.write(constants.SHORT_ZERO);
-
-  // number of entries
-  this.write(zipUtil.getShortBytes(records));
-  this.write(zipUtil.getShortBytes(records));
-
-  // length and location of CD
-  this.write(zipUtil.getLongBytes(size));
-  this.write(zipUtil.getLongBytes(offset));
-
-  // archive comment
-  var comment = this.getComment();
-  var commentLength = Buffer.byteLength(comment);
-  this.write(zipUtil.getShortBytes(commentLength));
-  this.write(comment);
-};
-
-ZipArchiveOutputStream.prototype._writeCentralDirectoryZip64 = function() {
-  // signature
-  this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD));
-
-  // size of the ZIP64 EOCD record
-  this.write(zipUtil.getEightBytes(56));
-
-  // version made by
-  this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
-
-  // version to extract
-  this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
-
-  // disk numbers
-  this.write(constants.LONG_ZERO);
-  this.write(constants.LONG_ZERO);
-
-  // number of entries
-  this.write(zipUtil.getEightBytes(this._entries.length));
-  this.write(zipUtil.getEightBytes(this._entries.length));
-
-  // length and location of CD
-  this.write(zipUtil.getEightBytes(this._archive.centralLength));
-  this.write(zipUtil.getEightBytes(this._archive.centralOffset));
-
-  // extensible data sector
-  // not implemented at this time
-
-  // end of central directory locator
-  this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD_LOC));
-
-  // disk number holding the ZIP64 EOCD record
-  this.write(constants.LONG_ZERO);
-
-  // relative offset of the ZIP64 EOCD record
-  this.write(zipUtil.getEightBytes(this._archive.centralOffset + this._archive.centralLength));
-
-  // total number of disks
-  this.write(zipUtil.getLongBytes(1));
-};
-
-ZipArchiveOutputStream.prototype._writeCentralFileHeader = function(ae) {
-  var gpb = ae.getGeneralPurposeBit();
-  var method = ae.getMethod();
-  var offsets = ae._offsets;
-
-  var size = ae.getSize();
-  var compressedSize = ae.getCompressedSize();
-
-  if (ae.isZip64() || offsets.file > constants.ZIP64_MAGIC) {
-    size = constants.ZIP64_MAGIC;
-    compressedSize = constants.ZIP64_MAGIC;
-
-    ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
-
-    var extraBuf = Buffer.concat([
-      zipUtil.getShortBytes(constants.ZIP64_EXTRA_ID),
-      zipUtil.getShortBytes(24),
-      zipUtil.getEightBytes(ae.getSize()),
-      zipUtil.getEightBytes(ae.getCompressedSize()),
-      zipUtil.getEightBytes(offsets.file)
-    ], 28);
-
-    ae.setExtra(extraBuf);
-  }
-
-  // signature
-  this.write(zipUtil.getLongBytes(constants.SIG_CFH));
-
-  // version made by
-  this.write(zipUtil.getShortBytes((ae.getPlatform() << 8) | constants.VERSION_MADEBY));
-
-  // version to extract and general bit flag
-  this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
-  this.write(gpb.encode());
-
-  // compression method
-  this.write(zipUtil.getShortBytes(method));
-
-  // datetime
-  this.write(zipUtil.getLongBytes(ae.getTimeDos()));
-
-  // crc32 checksum
-  this.write(zipUtil.getLongBytes(ae.getCrc()));
-
-  // sizes
-  this.write(zipUtil.getLongBytes(compressedSize));
-  this.write(zipUtil.getLongBytes(size));
-
-  var name = ae.getName();
-  var comment = ae.getComment();
-  var extra = ae.getCentralDirectoryExtra();
-
-  if (gpb.usesUTF8ForNames()) {
-    name = new Buffer(name);
-    comment = new Buffer(comment);
-  }
-
-  // name length
-  this.write(zipUtil.getShortBytes(name.length));
-
-  // extra length
-  this.write(zipUtil.getShortBytes(extra.length));
-
-  // comments length
-  this.write(zipUtil.getShortBytes(comment.length));
-
-  // disk number start
-  this.write(constants.SHORT_ZERO);
-
-  // internal attributes
-  this.write(zipUtil.getShortBytes(ae.getInternalAttributes()));
-
-  // external attributes
-  this.write(zipUtil.getLongBytes(ae.getExternalAttributes()));
-
-  // relative offset of LFH
-  if (offsets.file > constants.ZIP64_MAGIC) {
-    this.write(zipUtil.getLongBytes(constants.ZIP64_MAGIC));
-  } else {
-    this.write(zipUtil.getLongBytes(offsets.file));
-  }
-
-  // name
-  this.write(name);
-
-  // extra
-  this.write(extra);
-
-  // comment
-  this.write(comment);
-};
-
-ZipArchiveOutputStream.prototype._writeDataDescriptor = function(ae) {
-  // signature
-  this.write(zipUtil.getLongBytes(constants.SIG_DD));
-
-  // crc32 checksum
-  this.write(zipUtil.getLongBytes(ae.getCrc()));
-
-  // sizes
-  if (ae.isZip64()) {
-    this.write(zipUtil.getEightBytes(ae.getCompressedSize()));
-    this.write(zipUtil.getEightBytes(ae.getSize()));
-  } else {
-    this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
-    this.write(zipUtil.getLongBytes(ae.getSize()));
-  }
-};
-
-ZipArchiveOutputStream.prototype._writeLocalFileHeader = function(ae) {
-  var gpb = ae.getGeneralPurposeBit();
-  var method = ae.getMethod();
-  var name = ae.getName();
-  var extra = ae.getLocalFileDataExtra();
-
-  if (ae.isZip64()) {
-    gpb.useDataDescriptor(true);
-    ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
-  }
-
-  if (gpb.usesUTF8ForNames()) {
-    name = new Buffer(name);
-  }
-
-  ae._offsets.file = this.offset;
-
-  // signature
-  this.write(zipUtil.getLongBytes(constants.SIG_LFH));
-
-  // version to extract and general bit flag
-  this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
-  this.write(gpb.encode());
-
-  // compression method
-  this.write(zipUtil.getShortBytes(method));
-
-  // datetime
-  this.write(zipUtil.getLongBytes(ae.getTimeDos()));
-
-  ae._offsets.data = this.offset;
-
-  // crc32 checksum and sizes
-  if (gpb.usesDataDescriptor()) {
-    this.write(constants.LONG_ZERO);
-    this.write(constants.LONG_ZERO);
-    this.write(constants.LONG_ZERO);
-  } else {
-    this.write(zipUtil.getLongBytes(ae.getCrc()));
-    this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
-    this.write(zipUtil.getLongBytes(ae.getSize()));
-  }
-
-  // name length
-  this.write(zipUtil.getShortBytes(name.length));
-
-  // extra length
-  this.write(zipUtil.getShortBytes(extra.length));
-
-  // name
-  this.write(name);
-
-  // extra
-  this.write(extra);
-
-  ae._offsets.contents = this.offset;
-};
-
-ZipArchiveOutputStream.prototype.getComment = function(comment) {
-  return this._archive.comment !== null ? this._archive.comment : '';
-};
-
-ZipArchiveOutputStream.prototype.isZip64 = function() {
-  return this._entries.length > constants.ZIP64_MAGIC_SHORT || this._archive.centralLength > constants.ZIP64_MAGIC || this._archive.centralOffset > constants.ZIP64_MAGIC;
-};
-
-ZipArchiveOutputStream.prototype.setComment = function(comment) {
-  this._archive.comment = comment;
+/**
+ * node-compress-commons
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
+ */
+var inherits = require('util').inherits;
+var crc32 = require('buffer-crc32');
+var CRC32Stream = require('crc32-stream');
+var DeflateCRC32Stream = CRC32Stream.DeflateCRC32Stream;
+
+var ArchiveOutputStream = require('../archive-output-stream');
+var ZipArchiveEntry = require('./zip-archive-entry');
+var GeneralPurposeBit = require('./general-purpose-bit');
+
+var constants = require('./constants');
+var util = require('../../util');
+var zipUtil = require('./util');
+
+var ZipArchiveOutputStream = module.exports = function(options) {
+  if (!(this instanceof ZipArchiveOutputStream)) {
+    return new ZipArchiveOutputStream(options);
+  }
+
+  options = this.options = this._defaults(options);
+
+  ArchiveOutputStream.call(this, options);
+
+  this._entry = null;
+  this._entries = [];
+  this._archive = {
+    centralLength: 0,
+    centralOffset: 0,
+    comment: '',
+    finish: false,
+    finished: false,
+    processing: false
+  };
+};
+
+inherits(ZipArchiveOutputStream, ArchiveOutputStream);
+
+ZipArchiveOutputStream.prototype._afterAppend = function(ae) {
+  this._entries.push(ae);
+
+  if (ae.getGeneralPurposeBit().usesDataDescriptor()) {
+    this._writeDataDescriptor(ae);
+  }
+
+  this._archive.processing = false;
+  this._entry = null;
+
+  if (this._archive.finish && !this._archive.finished) {
+    this._finish();
+  }
+};
+
+ZipArchiveOutputStream.prototype._appendBuffer = function(ae, source, callback) {
+  if (source.length === 0) {
+    ae.setMethod(constants.METHOD_STORED);
+  }
+
+  var method = ae.getMethod();
+
+  if (method === constants.METHOD_STORED) {
+    ae.setSize(source.length);
+    ae.setCompressedSize(source.length);
+    ae.setCrc(crc32.unsigned(source));
+  }
+
+  this._writeLocalFileHeader(ae);
+
+  if (method === constants.METHOD_STORED) {
+    this.write(source);
+    this._afterAppend(ae);
+    callback(null, ae);
+    return;
+  } else if (method === constants.METHOD_DEFLATED) {
+    this._smartStream(ae, callback).end(source);
+    return;
+  } else {
+    callback(new Error('compression method ' + method + ' not implemented'));
+    return;
+  }
+};
+
+ZipArchiveOutputStream.prototype._appendStream = function(ae, source, callback) {
+  ae.getGeneralPurposeBit().useDataDescriptor(true);
+  ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
+
+  this._writeLocalFileHeader(ae);
+
+  var smart = this._smartStream(ae, callback);
+  source.pipe(smart);
+};
+
+ZipArchiveOutputStream.prototype._defaults = function(o) {
+  if (typeof o !== 'object') {
+    o = {};
+  }
+
+  if (typeof o.zlib !== 'object') {
+    o.zlib = {};
+  }
+
+  if (typeof o.zlib.level !== 'number') {
+    o.zlib.level = constants.ZLIB_BEST_SPEED;
+  }
+
+  return o;
+};
+
+ZipArchiveOutputStream.prototype._finish = function() {
+  this._archive.centralOffset = this.offset;
+
+  this._entries.forEach(function(ae) {
+    this._writeCentralFileHeader(ae);
+  }.bind(this));
+
+  this._archive.centralLength = this.offset - this._archive.centralOffset;
+
+  if (this.isZip64()) {
+    this._writeCentralDirectoryZip64();
+  }
+
+  this._writeCentralDirectoryEnd();
+
+  this._archive.processing = false;
+  this._archive.finish = true;
+  this._archive.finished = true;
+  this.end();
+};
+
+ZipArchiveOutputStream.prototype._normalizeEntry = function(ae) {
+  if (ae.getMethod() === -1) {
+    ae.setMethod(constants.METHOD_DEFLATED);
+  }
+
+  if (ae.getMethod() === constants.METHOD_DEFLATED) {
+    ae.getGeneralPurposeBit().useDataDescriptor(true);
+    ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
+  }
+
+  if (ae.getTime() === -1) {
+    ae.setTime(new Date());
+  }
+
+  ae._offsets = {
+    file: 0,
+    data: 0,
+    contents: 0,
+  };
+};
+
+ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) {
+  var deflate = ae.getMethod() === constants.METHOD_DEFLATED;
+  var process = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream();
+
+  function handleStuff(err) {
+    ae.setCrc(process.digest());
+    ae.setSize(process.size());
+    ae.setCompressedSize(process.size(true));
+    this._afterAppend(ae);
+    callback(null, ae);
+  }
+
+  process.once('error', callback);
+  process.once('end', handleStuff.bind(this));
+
+  process.pipe(this, { end: false });
+
+  return process;
+};
+
+ZipArchiveOutputStream.prototype._writeCentralDirectoryEnd = function() {
+  var records = this._entries.length;
+  var size = this._archive.centralLength;
+  var offset = this._archive.centralOffset;
+
+  if (this.isZip64()) {
+    records = constants.ZIP64_MAGIC_SHORT;
+    size = constants.ZIP64_MAGIC;
+    offset = constants.ZIP64_MAGIC;
+  }
+
+  // signature
+  this.write(zipUtil.getLongBytes(constants.SIG_EOCD));
+
+  // disk numbers
+  this.write(constants.SHORT_ZERO);
+  this.write(constants.SHORT_ZERO);
+
+  // number of entries
+  this.write(zipUtil.getShortBytes(records));
+  this.write(zipUtil.getShortBytes(records));
+
+  // length and location of CD
+  this.write(zipUtil.getLongBytes(size));
+  this.write(zipUtil.getLongBytes(offset));
+
+  // archive comment
+  var comment = this.getComment();
+  var commentLength = Buffer.byteLength(comment);
+  this.write(zipUtil.getShortBytes(commentLength));
+  this.write(comment);
+};
+
+ZipArchiveOutputStream.prototype._writeCentralDirectoryZip64 = function() {
+  // signature
+  this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD));
+
+  // size of the ZIP64 EOCD record
+  this.write(zipUtil.getEightBytes(56));
+
+  // version made by
+  this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
+
+  // version to extract
+  this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
+
+  // disk numbers
+  this.write(constants.LONG_ZERO);
+  this.write(constants.LONG_ZERO);
+
+  // number of entries
+  this.write(zipUtil.getEightBytes(this._entries.length));
+  this.write(zipUtil.getEightBytes(this._entries.length));
+
+  // length and location of CD
+  this.write(zipUtil.getEightBytes(this._archive.centralLength));
+  this.write(zipUtil.getEightBytes(this._archive.centralOffset));
+
+  // extensible data sector
+  // not implemented at this time
+
+  // end of central directory locator
+  this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD_LOC));
+
+  // disk number holding the ZIP64 EOCD record
+  this.write(constants.LONG_ZERO);
+
+  // relative offset of the ZIP64 EOCD record
+  this.write(zipUtil.getEightBytes(this._archive.centralOffset + this._archive.centralLength));
+
+  // total number of disks
+  this.write(zipUtil.getLongBytes(1));
+};
+
+ZipArchiveOutputStream.prototype._writeCentralFileHeader = function(ae) {
+  var gpb = ae.getGeneralPurposeBit();
+  var method = ae.getMethod();
+  var offsets = ae._offsets;
+
+  var size = ae.getSize();
+  var compressedSize = ae.getCompressedSize();
+
+  if (ae.isZip64() || offsets.file > constants.ZIP64_MAGIC) {
+    size = constants.ZIP64_MAGIC;
+    compressedSize = constants.ZIP64_MAGIC;
+
+    ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
+
+    var extraBuf = Buffer.concat([
+      zipUtil.getShortBytes(constants.ZIP64_EXTRA_ID),
+      zipUtil.getShortBytes(24),
+      zipUtil.getEightBytes(ae.getSize()),
+      zipUtil.getEightBytes(ae.getCompressedSize()),
+      zipUtil.getEightBytes(offsets.file)
+    ], 28);
+
+    ae.setExtra(extraBuf);
+  }
+
+  // signature
+  this.write(zipUtil.getLongBytes(constants.SIG_CFH));
+
+  // version made by
+  this.write(zipUtil.getShortBytes((ae.getPlatform() << 8) | constants.VERSION_MADEBY));
+
+  // version to extract and general bit flag
+  this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
+  this.write(gpb.encode());
+
+  // compression method
+  this.write(zipUtil.getShortBytes(method));
+
+  // datetime
+  this.write(zipUtil.getLongBytes(ae.getTimeDos()));
+
+  // crc32 checksum
+  this.write(zipUtil.getLongBytes(ae.getCrc()));
+
+  // sizes
+  this.write(zipUtil.getLongBytes(compressedSize));
+  this.write(zipUtil.getLongBytes(size));
+
+  var name = ae.getName();
+  var comment = ae.getComment();
+  var extra = ae.getCentralDirectoryExtra();
+
+  if (gpb.usesUTF8ForNames()) {
+    name = new Buffer(name);
+    comment = new Buffer(comment);
+  }
+
+  // name length
+  this.write(zipUtil.getShortBytes(name.length));
+
+  // extra length
+  this.write(zipUtil.getShortBytes(extra.length));
+
+  // comments length
+  this.write(zipUtil.getShortBytes(comment.length));
+
+  // disk number start
+  this.write(constants.SHORT_ZERO);
+
+  // internal attributes
+  this.write(zipUtil.getShortBytes(ae.getInternalAttributes()));
+
+  // external attributes
+  this.write(zipUtil.getLongBytes(ae.getExternalAttributes()));
+
+  // relative offset of LFH
+  if (offsets.file > constants.ZIP64_MAGIC) {
+    this.write(zipUtil.getLongBytes(constants.ZIP64_MAGIC));
+  } else {
+    this.write(zipUtil.getLongBytes(offsets.file));
+  }
+
+  // name
+  this.write(name);
+
+  // extra
+  this.write(extra);
+
+  // comment
+  this.write(comment);
+};
+
+ZipArchiveOutputStream.prototype._writeDataDescriptor = function(ae) {
+  // signature
+  this.write(zipUtil.getLongBytes(constants.SIG_DD));
+
+  // crc32 checksum
+  this.write(zipUtil.getLongBytes(ae.getCrc()));
+
+  // sizes
+  if (ae.isZip64()) {
+    this.write(zipUtil.getEightBytes(ae.getCompressedSize()));
+    this.write(zipUtil.getEightBytes(ae.getSize()));
+  } else {
+    this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
+    this.write(zipUtil.getLongBytes(ae.getSize()));
+  }
+};
+
+ZipArchiveOutputStream.prototype._writeLocalFileHeader = function(ae) {
+  var gpb = ae.getGeneralPurposeBit();
+  var method = ae.getMethod();
+  var name = ae.getName();
+  var extra = ae.getLocalFileDataExtra();
+
+  if (ae.isZip64()) {
+    gpb.useDataDescriptor(true);
+    ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
+  }
+
+  if (gpb.usesUTF8ForNames()) {
+    name = new Buffer(name);
+  }
+
+  ae._offsets.file = this.offset;
+
+  // signature
+  this.write(zipUtil.getLongBytes(constants.SIG_LFH));
+
+  // version to extract and general bit flag
+  this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
+  this.write(gpb.encode());
+
+  // compression method
+  this.write(zipUtil.getShortBytes(method));
+
+  // datetime
+  this.write(zipUtil.getLongBytes(ae.getTimeDos()));
+
+  ae._offsets.data = this.offset;
+
+  // crc32 checksum and sizes
+  if (gpb.usesDataDescriptor()) {
+    this.write(constants.LONG_ZERO);
+    this.write(constants.LONG_ZERO);
+    this.write(constants.LONG_ZERO);
+  } else {
+    this.write(zipUtil.getLongBytes(ae.getCrc()));
+    this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
+    this.write(zipUtil.getLongBytes(ae.getSize()));
+  }
+
+  // name length
+  this.write(zipUtil.getShortBytes(name.length));
+
+  // extra length
+  this.write(zipUtil.getShortBytes(extra.length));
+
+  // name
+  this.write(name);
+
+  // extra
+  this.write(extra);
+
+  ae._offsets.contents = this.offset;
+};
+
+ZipArchiveOutputStream.prototype.getComment = function(comment) {
+  return this._archive.comment !== null ? this._archive.comment : '';
+};
+
+ZipArchiveOutputStream.prototype.isZip64 = function() {
+  return this._entries.length > constants.ZIP64_MAGIC_SHORT || this._archive.centralLength > constants.ZIP64_MAGIC || this._archive.centralOffset > constants.ZIP64_MAGIC;
+};
+
+ZipArchiveOutputStream.prototype.setComment = function(comment) {
+  this._archive.comment = comment;
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/325bb661/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/compress-commons.js
----------------------------------------------------------------------
diff --git a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/compress-commons.js b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/compress-commons.js
index fe3a581..0113bbb 100644
--- a/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/compress-commons.js
+++ b/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/compress-commons.js
@@ -1,13 +1,13 @@
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
- */
-module.exports = {
-  ArchiveEntry: require('./archivers/archive-entry'),
-  ZipArchiveEntry: require('./archivers/zip/zip-archive-entry'),
-  ArchiveOutputStream: require('./archivers/archive-output-stream'),
-  ZipArchiveOutputStream: require('./archivers/zip/zip-archive-output-stream')
+/**
+ * node-compress-commons
+ *
+ * Copyright (c) 2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/ctalkington/node-compress-commons/blob/master/LICENSE-MIT
+ */
+module.exports = {
+  ArchiveEntry: require('./archivers/archive-entry'),
+  ZipArchiveEntry: require('./archivers/zip/zip-archive-entry'),
+  ArchiveOutputStream: require('./archivers/archive-output-stream'),
+  ZipArchiveOutputStream: require('./archivers/zip/zip-archive-output-stream')
 };
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org