Self-Healing Archives & Reed-Solomon ECC
What Is Self-Healing Error Correction?
Every physical storage medium suffers from bit rot—spontaneous bit flips caused by cosmic rays, magnetic degradation in hard drives, charge leakage in flash memory (SSDs/SD cards), or packet drops during network file transfers.
In traditional .zip or .7z archives, losing even a single byte often corrupts the central directory or invalidates the DEFLATE/LZMA state, rendering the entire archive unopenable.
DodaZIP solves this problem with integrated Reed-Solomon Forward Error Correction (ECC). Parity shards are mathematically calculated and stored directly within the .dzip container. When opening, verifying, or extracting an archive, DodaZIP can automatically reconstruct corrupted data on the fly.
🧮 How Reed-Solomon ECC Works
DodaZIP implements Galois Field $GF(2^8)$ Reed-Solomon erasure coding:
- Shard Division: The archive stream is sliced into $k$ data shards of uniform size.
- Parity Generation: The encoder calculates $m$ parity shards using matrix multiplication over finite fields.
- Reconstruction Rule: As long as any $k$ out of the total $k + m$ shards survive intact, the original archive can be reconstructed with 100% mathematical fidelity.
+------------------------------------+-------------------------+
| Data Shards (k) | Parity Shards (m) |
| [Shard 1] [Shard 2] ... [Shard k] | [ECC 1] [ECC 2] ... |
+------------------------------------+-------------------------+
^ |
|--- If Shard 2 is corrupted --------+ (Parity repairs Shard 2)🛡️ Protection Profiles
You can customize the self-healing level depending on the importance of the data and storage reliability:
| Level | Parity Overhead | Maximum Tolerated Corruption | Recommended Use Case |
|---|---|---|---|
| None | 0% | 0% | Ephemeral transfers, low-value temp files |
| Low | ~10% | Up to 10% damaged sectors | Standard desktop backups, local NVMe SSDs |
| Medium (Recommended) | ~25% | Up to 20% damaged sectors | Critical documents, family photos, source code |
| High | ~50% | Up to 33% damaged sectors | Long-term cold storage, tape, USB flash, optical discs |
🔍 Cryptographic Verification & Auto-Repair
In the Desktop GUI
- Select an archive and click the Verify action.
- DodaZIP computes BLAKE3 hashes for every chunk and checks ECC parity matrices.
- If corruption is found, DodaZIP reports the damaged sectors and applies Reed-Solomon correction to restore data.
In the CLI
# Create an archive with Medium self-healing ECC
dodazip c -i ./photos -o family-vault.dzip --ecc medium
# Run a complete cryptographic and parity integrity audit
dodazip v family-vault.dzip
# Extract archive (auto-repairs damaged sectors during extraction)
dodazip x family-vault.dzip -o ./restored-photos/