Before endeavoring to help I must tell you that I am not a programmer by any stretch. I'm using linux, kernel version 2.6.18.8. I'm working from the link below to arrive where I'm at so far:
http://linux.derkeiler.com/Newsgroup...4-03/0561.html
First of all, I am working with a gzipped tar file. I suspect that fixing the gz file will still leave me with a corrupt tar file. Please do not hesitate to let me know if reconstructing/recovering the tar file is futile. I am also using khexedit, which I suspect I will need to fix the .gz and tar file within it.
I've downloaded gzip version 1.3.12, edited unzip.c to include
Code:
fprintf(stderr, "bytes_in %ld\n", bytes_in);
The package compiled perfectly.
I ran:
Code:
tar zxvf damaged.tar.gz
(It's a big file, 3.2GB)
This gave me
Code:
<files extracted up to damaged part of file>
bytes_in 469237760
gzip: stdin: invalid compressed data--format violated
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
The questions I have are figuring out disk block size and how to concatenate a valid .gz header.
This is the layout of the hard drive where the tar.gz file was backed-up to:
Units = cylinders of 16065 * 512 = 8225280 bytes
The drive layout is probably not terribly relevent with the exception of figuring out where I am in the file on disc.
I've also read algorithm.doc that is included with the sources but it's beyond my ability to grasp. Also, would anyone be able to paste a commented header example that I can look at?
Please do not hesitate to let me know if there is more information I can provide.
Thanks,
Andrew