views:

75

answers:

3

So I just spent a week running a simulation, but the computer had to be turned off to move it (terrible, I know). The data that was being produced was being zipped due to it's size by piping it into gzip, but since the simulation wasn't finished, I can't unzip the .gz file. We have since started the simulation over, but I was wondering if it would be possible to recover some of the data since a view of what we have produced so far would be really helpful. It seems to me that since data can be piped in and out of gzip, the zipping is on the fly and not based on the data as a whole so theoretically it should be possible to get some of the data out, but a quick google search produced nothing so I thought I would see if anyone had any suggestions.

+1  A: 

The suggestions in the following stackoverflow thread may be useful: http://stackoverflow.com/questions/1732709/unzipping-part-of-a-gz-file-using-python

ChristopheD
A: 

GZip is a block-level compression - if you don't mind writing some code to make the decompressor ignore CRC failures, I suspect you can get some of the data out

Paul Betts
+2  A: 

It's should be easy to recover what's been gzipped providing it's the end of the file that's 'missing'

zcat yourfile.gz > yourfile

Or

cat yourfile.gz |gunzip >yourfile
nos