fixing broken .Z files?

Jim Battle frustum at pacbell.net
Thu Mar 3 12:50:30 CST 2005


Jules Richardson wrote:

...
> However the question about fixing .Z files still stands - I'm suprised
> that given how long the format's been around, nobody ever published a
> utility to attempt to fix corrupt files. 
...

There is a fundamental problem why it is not tractable in general.  The 
whole point of a compressor is to get rid of the redundancy as much as 
possible (some of course are better than others with a given input 
file).  It is exactly that redundancy that makes automated recovery 
possible.  Disk recovery relies on the fact that everything is cross 
linked with everything else so you can fix up the broken sector chains etc.

If you happen to have very specific knowledge about the failure mode and 
the lost/corrupted/inserted data is just a small amount it might be 
possible to have an automated aid to assist in recovering the data, but 
mostly everything downstream from the failure is going to be lost.

Even though G4 compression is 2x as effective as G3 compression (on 
bilevel images), fax machines still use G3 because any error propagates 
to the end of the scan line whereas the same error in a G4 file can 
trash the image all the way to the end of the page.

If the entire tape is compressed as a stream, then things are very bad 
indeed.  If the tape image compresses each file individually, then it 
should be possible to skip for a while and find a good new starting point.



More information about the cctalk mailing list