rargz 0.1.1

Fast parallel tar + zstd archiver and extractor with optional chunked format.
rargz-0.1.1 is not a library.

rargz

Crates.io License Rust

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.zst by default (compatible with tar --zstd or zstd -d)
  • Optional .rargz chunked format (designed for future parallel decompression)
  • Streaming extraction (stdin to filesystem)

Installation

cargo install rargz

From source:

cargo install --path .

Archiving

Create a standard .tar.zst archive and write it to stdout:

rargz path/to/input > archive.tar.zst

Enable the chunked .rargz format:

rargz --format rargz path/to/input > archive.rargz

Tune chunk size and thread count:

rargz --chunk-size 4MiB --jobs 8 path/to/input > archive.tar.zst

Extraction

Extraction reads from stdin and writes the output to the directory specified with -o/--output:

cat archive.tar.zst | rargz --extract -o ./output

.tar.zst streams are decompressed sequentially for compatibility.
.rargz streams are chunked and designed for parallel decompression (WIP until format is finalized).

Format details

  • .tar.zst mode produces a pure tar stream compressed with zstd. Fully compatible with standard tools:

    • tar --zstd -xf archive.tar.zst
    • zstd -d archive.tar.zst | tar -xf -
  • .rargz mode adds a small header (RARGZ\0, version, chunk size) and length-prefixes each compressed chunk. This enables random access and parallel decompression.

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.