Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

uncompress error - can I fix?

Status
Not open for further replies.

mlowe9

Programmer
Apr 3, 2002
221
US
We have some compressed files that I get the error:

uncompress: 0653-059 The input file contains bad data; SIGSEGV signal received.

I realize this was probably caused by FTP'ing the file via ASCII rather than BIN. I tried to fix the file by replacing every instance of 0D0A with a 0D, but it's not working.

Am I correct in thinking that the problem is that transferring in ASCII adds the 0A to 0D's, and that removing those particular 0A's would fix it?

Can anyone explain this for me? Does anyone know how I could fix these corrupted files?
 
I found gzip, which has a utility for Windows OS called fizgz, that fixes my .Z file. Then I can transfer it (BINARY) to my server and I can uncompress it.

Anyone know what exactly the fixgz does, and why it's not available for AIX?
 
Off the top of me head - so don't blame me if some or all is rubbish....
If you ASCII transfer a file it adds a carriage return (CR) every 1024 characters.
If it was a binary file this messes things up somewhat.
You can often get away with transferring it as an ASCII file - again, then sending it back as a binary file.
I don't know or understand how this works because you'd think you'd just end up with twice as many CR's - which makes me think the above assumption is flawed.
But I have often recovered files this way.
mlowe9 - replacing ALL the 0D0A's with 0D may be the problem, there may be some in the binary that were never just an 0D.
 
uncompress doesn't check some pointers, so if the incoming data stream is corrupted, a segmentation violation signal is sent.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top