hexz-cli
Command-line tool for managing Hexz high-performance deduplicated archives.
Overview
The hexz CLI provides a comprehensive interface for creating, analyzing, and managing Hexz archives (.hxz). It is optimized for large-scale data distribution, offering block-level deduplication, transparent compression, and instant random-access via FUSE mounting.
Installation
From Source
# Clone the repository
# Install the CLI
# Or install directly with cargo
Quick Examples
Pack an Archive
Convert files or directories into a compressed, deduplicated Hexz archive:
# Pack a directory
# Create a thin delta against a base archive
Mount an Archive
Access archive contents instantly without extraction (requires FUSE):
Extract an Archive
# Extract an archive to a directory
Inspect an Archive
# Show archive metadata and stats
# Get JSON output for programmatic access
Command Reference
Archive & Filesystem Operations
| Command | Description |
|---|---|
pack |
Create an archive from a file or directory |
extract |
Reconstruct original files from an archive |
mount |
Mount an archive as a FUSE filesystem |
unmount |
Safely detach a mounted archive |
Inspection & Comparison
| Command | Description |
|---|---|
show |
Display archive metadata and statistics |
diff |
Compare two archives at the block level |
log |
List archives in a directory and show their lineage |
Common Options
Compression
Choose compression algorithm with --compression:
lz4- Fast compression (~2GB/s), lower ratio (default)zstd- Better compression (~500MB/s), higher ratio
Deduplication (CDC)
Hexz uses Content-Defined Chunking (CDC) to identify shared blocks even if offsets shift. This is enabled by default.
Encryption
Encrypt archives with --encrypt:
- Uses AES-256-GCM.
- You'll be prompted for a password (or use
HEXZ_PASSWORDenv var).
Features
The CLI supports compile-time feature flags:
default:["fuse", "server", "compression-zstd", "encryption", "signing"]fuse: FUSE filesystem support for mountingserver: HTTP server for archive streamingcompression-zstd: Zstandard compressionencryption: AES-256-GCM encryptionsigning: Cryptographic signing for archives
Performance
The CLI is optimized for high-throughput operations:
- Pack throughput: ~2GB/s (LZ4), ~500MB/s (Zstd)
- Random Access: O(1) seek time via hierarchical indexing
- Deduplication: FastCDC with parallel processing
- Zero-copy: Direct memory mapping for efficient reads
See Also
- hexz-core - Core engine library
- Project README - Main project overview