Home > Archive > Compression > September 2006 > Loose gunzip
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| I have some gzipped files downloaded from a server using a Perl
program. Due to some problem, some files downloaded are corrupted. When
we investigated further, we found that only two bytes ( in some random
location) differ. Is there any way to loosely unzip that file to get
whatever portion can be recovered. The file is a gzipped plain text
file.
| |
| Mark Adler 2006-08-31, 9:55 pm |
| vijay wrote:
> I have some gzipped files downloaded from a server using a Perl
> program. Due to some problem, some files downloaded are corrupted. When
> we investigated further, we found that only two bytes ( in some random
> location) differ. Is there any way to loosely unzip that file to get
> whatever portion can be recovered.
Simply use gzip -dc to write whatever it can extract to stdout:
gzip -dc < clobbered.gz > clobbered.somethingihope
You will need to look at the output manually to see where it goes bad,
and throw out the remainder.
mark
| |
|
| On 2006-09-01, vijay <vijaykcm@gmail.com> wrote:
> I have some gzipped files downloaded from a server using a Perl
> program. Due to some problem, some files downloaded are corrupted. When
> we investigated further, we found that only two bytes ( in some random
> location) differ.
rsync is ideal for fixing this sort of problem, but you'de need to run rsyncd on
the server...
Bye.
Jasen
|
|
|
|
|