Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Node.js
  3. tar-stream

tar-stream

MITJavaScript

A pure streaming tar parser and generator for Node.js that operates without hitting the file system.

GitHubGitHub
435 stars103 forks0 contributors

What is tar-stream?

tar-stream is a Node.js library that provides a pure streaming interface for parsing and generating tar archives. It allows developers to extract, create, and modify tarballs entirely in memory using streams, without ever touching the file system. This solves the problem of efficiently processing tar files in network applications, build tools, or pipelines where file system access is slow or undesirable.

Target Audience

Node.js developers who need to programmatically work with tar archives in memory, such as those building deployment tools, backup systems, package managers, or network services that handle tarballs.

Value Proposition

Developers choose tar-stream for its minimal, focused approach to tar processing using Node.js streams, which provides better memory efficiency and control compared to file-based alternatives. Its pure streaming design makes it ideal for piping data between network sources, transformations, and destinations without intermediate disk writes.

Overview

tar-stream is a streaming tar parser and generator.

Use Cases

Best For

  • Processing tar archives from network streams without saving to disk
  • Dynamically generating tarballs in memory for API responses
  • Modifying existing tarballs by filtering or rewriting entries
  • Building custom package managers or deployment tools
  • Creating backup systems that stream archives directly to storage
  • Implementing build pipelines that package artifacts on-the-fly

Not Ideal For

  • Applications needing direct file system extraction or packing without additional libraries
  • Projects requiring built-in support for compressed formats like .tar.gz
  • Simple one-off tar operations where a higher-level, all-in-one solution would suffice
  • Environments with strict memory constraints for very large archives, despite streaming

Pros & Cons

Pros

Pure Streaming Interface

Operates entirely with Node.js streams, enabling efficient in-memory processing and automatic backpressure handling for network or pipeline use cases.

In-Memory Processing

Allows tar manipulation without file system access, ideal for scenarios like API responses or build tools where disk I/O is undesirable.

Flexible Modification Capabilities

Supports rewriting paths, changing modes, or filtering entries by piping between extract and pack streams, enabling dynamic tarball editing.

Modern Async Iterator Support

Extraction stream can be used as an async iterator, facilitating cleaner asynchronous workflows in modern Node.js applications.

Cons

No Built-in Compression

Does not handle .tar.gz or other compressed formats; requires additional modules like gunzip-maybe, adding complexity to setup.

Manual Stream Management Required

Users must drain each entry stream during extraction to avoid backpressure, which can be error-prone and less intuitive for beginners.

Lacks High-Level Abstractions

Focuses on low-level streaming, so common tasks like extracting to disk need extra steps or reliance on modules like tar-fs.

Frequently Asked Questions

Quick Stats

Stars435
Forks103
Contributors0
Open Issues13
Last commit2 months ago
CreatedSince 2013

Tags

#file-processing#memory-efficient#tar-archives#nodejs#async-iterator#streaming#backpressure-handling

Built With

N
Node.js

Included in

Node.js65.5k
Auto-fetched 17 hours ago

Related Projects

pakopako

high speed zlib port to javascript, works in browser & node.js

Stars6,103
Forks802
Last commit15 days ago
ArchiverArchiver

a streaming interface for archive generation

Stars2,972
Forks249
Last commit2 days ago
yauzlyauzl

yet another unzip library for node

Stars816
Forks84
Last commit1 month ago
yazlyazl

yet another zip library for node

Stars381
Forks50
Last commit4 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub