Open mnmnm opened 9 years ago
$ diff -ubrNdp gzrecover.c.ori gzrecover.c.new --- gzrecover.c.ori 2014-09-30 13:44:48.643503244 +0200 +++ gzrecover.c.new 2014-09-30 14:32:23.762568982 +0200 @@ -28,7 +28,7 @@
-#define VERSION "0.8" +#define VERSION "0.8a"
/* Global contants _/
@@ -185,7 +185,7 @@ skip_gzip_header(z_stream _d_stream) int main(int argc, char *_argv) {
int64_t opt, rc, rc2, ifd, ofd, founderr=0, foundgood=0; ssize_t bytes_read=0, tot_written=0; off_t errpos=0, errinc=0, readpos=0; char _infile; @@ -306,8 +306,8 @@ main(int argc, char *_argv) errpos = bytes_read - d_stream.avail_in;
if (verbose_mode)
(int64_t)(readpos - (bytes_read - errpos)));
if (d_stream.avail_in == 0)
{
@@ -374,8 +374,8 @@ main(int argc, char **argv) errinc = 0;
if (verbose_mode)
(int64_t)(readpos - (bytes_read - d_stream.avail_in)));
if (split_mode)
{
@@ -433,8 +433,8 @@ main(int argc, char **argv) close(ifd);
if (verbose_mode)
(int64_t)tot_written);
free(inbuf); free(outbuf);
Thanks for the patch. I'll try to give it a look in the next couple months as I'm swamped with work at present, but this looks straightforward.
Opened input file for reading: ../firefly-rk3288_sdk_git.tar.gz Opened output file for writing: firefly-rk3288_sdk_git.tar.recovered Found error at byte -394639277 in input stream Found good data at byte -395313152 in input stream Total decompressed output = -334166016 bytes
In [2]: 2**32 -394639277 Out[2]: 3900328019
very good utility for (re)downloading files from chinese baidu.com site. thanks a lot !!