Socket
Socket
Sign inDemoInstall

tar-stream

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tar-stream - npm Package Compare versions

Comparing version 1.0.2 to 1.1.1

23

extract.js

@@ -16,4 +16,4 @@ var util = require('util')

var emptyStream = function() {
var s = new PassThrough()
var emptyStream = function(self, offset) {
var s = new Source(self, offset)
s.end()

@@ -29,2 +29,14 @@ return s

var Source = function(self, offset) {
this._parent = self
this.offset = offset
PassThrough.call(this)
}
util.inherits(Source, PassThrough)
Source.prototype.destroy = function(err) {
this._parent.destroy(err)
}
var Extract = function(opts) {

@@ -34,2 +46,3 @@ if (!(this instanceof Extract)) return new Extract(opts)

this._offset = 0
this._buffer = bl()

@@ -90,2 +103,3 @@ this._missing = 0

var onheader = function() {
var offset = self._offset
var header

@@ -124,7 +138,7 @@ try {

self._parse(512, onheader)
self.emit('entry', header, emptyStream(), onunlock)
self.emit('entry', header, emptyStream(self, offset), onunlock)
return
}
self._stream = new PassThrough()
self._stream = new Source(self, offset)

@@ -152,2 +166,3 @@ self.emit('entry', header, self._stream, onunlock)

if (this._destroyed) return
this._offset += size
this._missing = size

@@ -154,0 +169,0 @@ this._onparse = onparse

2

package.json
{
"name": "tar-stream",
"version": "1.0.2",
"version": "1.1.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.",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc