Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 24, 2024 via pnpm

tar-stream 3.1.7

tar-stream is a streaming tar parser and generator and nothing else. It operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.
Package summary
Share
0
issues
2
licenses
4
MIT
2
Apache-2.0
Package created
20 Dec 2013
Version published
19 Jan 2024
Maintainers
2
Total deps
6
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
fast-fifo@1.3.2
queue-tick@1.0.1
streamx@2.16.1
tar-stream@3.1.7

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
2 Packages, Including:
b4a@1.6.6
bare-events@2.2.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of tar-stream 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
b4a1.6.69.46 kBApache-2.0
prod
fast-fifo1.3.22.22 kBMIT
prod
streamx2.16.148.1 kBMIT
prod

Visualizations

Frequently Asked Questions

What does tar-stream do?

Tar-stream is a highly efficient tool that allows for streaming tar parsing and generation. It doesn't perform any other function, keeping its operation precise and specialized. It leverages the power of streams enabling easy extraction and parsing of tarballs without involving the file system. In spite of its capabilities, if your data is in the .tar.gz format, you would still need to gunzip it. Tar-stream is recommended to be used in conjunction with gunzip-maybe in such situations.

How do you use tar-stream?

To use tar-stream in your projects, you need to install it by running npm install tar-stream. Post-installation, tar-stream provides you with two streams: the pack stream to create tarballs and the extract stream to extract tarballs. To modify existing tarballs, you can use both streams together.

Pack function usage example:

const tar = require('tar-stream')
const pack = tar.pack() // pack is a stream

// add a file called my-test.txt with the content "Hello World!"
pack.entry({ name: 'my-test.txt' }, 'Hello World!')

// pipe the pack stream
pack.pipe(process.stdout)

Extract function usage example:

const extract = tar.extract()

extract.on('entry', function (header, stream, next) {
  // extracting the content body (might be an empty stream)
  // calling next() when done with this entry

  stream.on('end', function () {
    next() // ready for next entry
  })

  stream.resume() // autodraining the stream
})

extract.on('finish', function () {
  // all entries read
})

pack.pipe(extract) 

Where are the tar-stream docs?

The comprehensive documentation for tar-stream is provided in its README on the GitHub page. The README details the usage of the two primary extracts and packs streams and provides ample examples to understand the functionality. There are also notes regarding the header properties, as well as instructions on how to modify existing tarballs. Examples on saving tarball to file system are provided for further understanding.