tar-stream
Advanced tools
Comparing version 0.4.0 to 0.4.1
var util = require('util'); | ||
var bl = require('bl'); | ||
var xtend = require('xtend'); | ||
var headers = require('./headers'); | ||
@@ -41,2 +42,3 @@ | ||
this._pax = null; | ||
this._paxGlobal = null; | ||
@@ -70,5 +72,13 @@ var self = this; | ||
var onpaxglobalheader = function() { | ||
var size = self._header.size; | ||
self._paxGlobal = headers.decodePax(b.slice(0, size)); | ||
b.consume(size); | ||
onstreamend(); | ||
} | ||
var onpaxheader = function() { | ||
var size = self._header.size; | ||
self._pax = headers.decodePax(b.slice(0, size)); | ||
if (self._paxGlobal) self._pax = xtend(self._paxGlobal, self._pax); | ||
b.consume(size); | ||
@@ -92,2 +102,7 @@ onstreamend(); | ||
} | ||
if (header.type === 'pax-global-header') { | ||
self._parse(header.size, onpaxglobalheader); | ||
oncontinue(); | ||
return; | ||
} | ||
if (header.type === 'pax-header') { | ||
@@ -94,0 +109,0 @@ self._parse(header.size, onpaxheader); |
@@ -35,2 +35,4 @@ var ZEROS = '0000000000000000000'; | ||
return 'pax-header'; | ||
case 55: | ||
return 'pax-global-header' | ||
} | ||
@@ -37,0 +39,0 @@ |
{ | ||
"name": "tar-stream", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "tar-stream is a streaming tar parser and generator and nothing else. It is streams2 and operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.", | ||
@@ -13,3 +13,4 @@ "repository": "git://github.com:mafintosh/tar-stream.git", | ||
"end-of-stream": "~0.1.3", | ||
"readable-stream": "~1.0.26-4" | ||
"readable-stream": "~1.0.26-4", | ||
"xtend": "^3.0.0" | ||
}, | ||
@@ -16,0 +17,0 @@ "devDependencies": { |
121693
970
4
+ Addedxtend@^3.0.0
+ Addedxtend@3.0.0(transitive)