Crates.io | toa |
lib.rs | toa |
version | 0.2.0 |
created_at | 2025-08-21 15:11:19.843551+00 |
updated_at | 2025-08-23 18:31:18.460463+00 |
description | TOA compression command-line tool. Modern compression with built-in error correction |
homepage | https://github.com/hasenbanck/toa/ |
repository | https://github.com/hasenbanck/toa/ |
max_upload_size | |
id | 1804943 |
size | 118,410 |
TOA is a next-generation compression format that combines exceptional compression ratios with built-in error correction, streaming operation, and parallel processing. TOA provides unique resilience against data corruption while maintaining competitive compression performance. Especially useful to guard important archival data against bit rot. It uses LZMA2s, a special variant of LZMA as it's compression algorithm.
Note: TOA format is currently at specification version 0.8 and not yet frozen. While the core features are stable, the format may evolve before reaching version 1.0. The specification is thoroughly documented in SPECIFICATION.md.
Benchmark results for toa.exe
(903K original):
Format | Size | Compression | Notes |
---|---|---|---|
TOA (extreme ECC) | 392K | 56.6% | Extreme error correction |
TOA (paranoid ECC) | 336K | 62.8% | Paranoid error correction |
TOA (standard ECC) | 314K | 65.2% | Standard error correction |
TOA (no ECC) | 294K | 67.4% | Best compression, only metadata protected |
XZ | 294K | 67.4% | Reference compression |
zstd -9 | 356K | 60.6% | Modern compression |
zstd -3 | 377K | 58.3% | Fast compression |
gzip -9 | 367K | 59.4% | Traditional compression |
TOA delivers XZ-level compression with unique, built-in error correction capabilities that no other format provides.
Download the latest release from GitHub Releases
cargo install toa
git clone https://github.com/hasenbanck/toa
cd toa
cargo build --release
# Compress a file (uses optimal preset 6)
toa input.txt
# → Creates input.txt.toa
# Compress with no error correction for the data
toa --ecc none input.txt
# Decompress a file
toa -d input.txt.toa
# → Restores input.txt
# Keep original file during decompression
toa -dk input.txt.toa
# View file metadata and block information
toa -l archive.toa
# Ultra-fast compression (preset 0)
toa -0 input.txt
# Default balanced compression (preset 6)
toa input.txt
# Maximum compression for large files (preset 9)
toa -9 largefile.bin
Use Standard unless you have a specific reason not to. It handles all normal storage degradation for decades. Paranoid and Extreme are for specialized scenarios like single-copy archives on sketchy media or century-scale preservation.
# Standard ECC: 6.3% overhead, corrects 8 bytes per 255-byte block (default)
toa --ecc standard input.txt
# Paranoid ECC: 12.5% overhead, corrects 16 bytes per 255-byte block
toa --ecc paranoid input.txt
# Extreme ECC: 25% overhead, corrects 32 bytes per 255-byte block
toa --ecc extreme input.txt
# No ECC: Only metadata is protected
toa --ecc none input.txt
# Optimize x86 executables
toa --x86 program.exe
# Optimize ARM binaries
toa --arm64 arm-binary
# Use all CPU cores (default)
toa -9 --threads 0 largefile.bin
# Specify thread count
toa --threads 8 input.txt
# Optimize block count for parallelization
toa --block-count 32 input.txt
# Fine-tune LZMA parameters
toa --lc 3 --lp 0 --pb 2 --dict-size 26 input.txt
# Specify exact output file
toa -o compressed.toa input.txt
TOA combines proven technologies in a novel way:
Licensed under the Apache License, Version 2.0
The TOA specification is placed in the public domain for unrestricted implementation.