rargz
rargz is a fast parallel tar + zstd archiver. It walks a directory, emits a deterministic tar stream, and compresses chunks concurrently with independent zstd workers.
Features
- Parallel tar stream generation with independent zstd workers
- Optional progress indicator (auto-disables when stderr is not a TTY)
- Produces standard
.tar.zstby default (compatible withtar --zstdorzstd -d) - Opt-in
.rargzchunked format with cooperative parallel decompression - Streaming extraction (
stdinto filesystem) with automatic format detection - Metadata inspection via
--listand--count
Installation
From source:
Archiving
Create a standard .tar.zst archive and write it to stdout:
Enable the chunked .rargz format:
Tune chunk size and thread count:
Disable the progress spinner explicitly when scripting:
Extraction
Extraction reads from stdin (or a path argument) and writes the output to the directory specified with -o/--output:
Or stream over stdin:
|
rargz auto-detects plain .tar.zst streams versus chunked .rargz streams. Standard archives are decompressed sequentially for compatibility. Chunked archives fan out to the worker pool for parallel decompression and untar.
Progress is enabled by default; disable it with --no-progress or by piping stderr.
Inspecting archives
Scan metadata without unpacking by either piping the archive or passing it as an argument:
--list prints each entry path (similar to tar -tf), while --count emits a single total. Both modes skip extracting payloads and work with either format. When no path is supplied, the commands read from stdin (so you can still pipe data in).
Format details
-
.tar.zstmode produces a pure tar stream compressed with zstd. Fully compatible with standard tools:tar --zstd -xf archive.tar.zstzstd -d archive.tar.zst | tar -xf -
-
.rargzmode adds a small header (RARGZ\0, version, chunk size) and length-prefixes each compressed chunk. The extra framing allowsrargzto decompress different chunks in parallel during extraction or inspection.
Safety
- Parent directory components (
..) are removed from archive paths to prevent extraction from writing outside the target tree. - Any error in the pipeline cancels all worker threads immediately.
License
MIT. See LICENSE for details.