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.
671,352 files → 27 seconds:
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) - Optional
.rargzchunked format (designed for future parallel decompression) - Streaming extraction (
stdinto filesystem)
Installation
From source:
Archiving
Create a standard .tar.zst archive and write it to stdout:
Enable the chunked .rargz format:
Tune chunk size (bytes) and thread count:
Raise the compression level (zstd 1–22, default 3) and silence the progress spinner:
Extraction
Extraction reads from stdin and writes the output to the directory specified with -o/--output:
or
|
.tar.zst streams are decompressed sequentially for compatibility.
.rargz streams are chunked and designed for parallel decompression (WIP until format is finalized).
You can also extract directly from a file without an explicit pipe:
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. This enables random access and parallel decompression.
Inspection
Read-only operations work on both .tar.zst and .rargz streams supplied via a file or stdin.
-
--listprints every entry path:# or -
--countreports how many entries are present:
Both modes consume the entire archive to validate it; they exit non-zero on structural errors.
Performance notes
--jobscontrols the compression worker pool (defaults to the number of logical CPUs).--chunk-sizespecifies the amount of tar data each compressor sees at once; larger chunks improve ratio, smaller chunks reduce memory per worker.--format rargzemits independently compressed chunks with a lightweight header for future parallel extraction support.--no-progressdisables the progress indicator (also auto-disables when stderr is not a TTY).
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.