On 2016-10-05 04:13, Jeffrey L. Taylor wrote:
Quoting Per Jessen <per@computer.org>:
Carlos E. R. wrote:
Not tar. The problem is gz.
Oh? Well, then use another compressor. xz is good.
All compression types are vulnerable to a single corrupted bit making the rest of the file unusable. Compression removes all redundancy. Unless there is error correction (additional bits), flipping a single bit is unrecoverable.
Exactly. But a pkzip archive is less vulnerable than a tar.gz archive, because the corruption affects a single file. Rar adds, on request, those error correction bits. There is another open format that does similarly, but I don't remember which.
Codes are variable length, so there is no way to know where the next valid codes starts. JPEG uses periodic reset codes that lets decoding/decompression to restart but everything between a corrupt bit and the next reset is lost.
Good idea.
Archives usually have a table of contents, so the most a single bit error can corrupt is a file.
except that a tar.gz compresses the already tabled archive. A single bit bad, and you can not recover the archive itself, so no table of contents, nothing. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)