ExtractProgress reporting incorrect progress

Feb 18, 2009 at 2:14 PM
Hi Guys,
I am using the latest beta files and trying to unzip a file from a zip file. I seem to be able to do this correctly, but there seems to be an issue in Update Progress as it goes negative after some time.

Ps : I am extracting a zip file which is almost 1GB and contains 2 files. One of these files is a few bytes, the other is over 2.2GB in size once extracted.

Here is the code i am using :

            //Here is the way i extract
            Ionic.Zip.ZipFile zip = Ionic.Zip.ZipFile.Read(zipName);
            Logger.Log("Extracting file : " + zipName);
           
            zip.ExtractProgress += new EventHandler<Ionic.Zip.ExtractProgressEventArgs>(zip_ExtractProgress);
            zip.ExtractAll(targetDir, true);
            zip.Dispose();
            zip = null;
            return true;

        }

        void zip_ExtractProgress(object sender, Ionic.Zip.ExtractProgressEventArgs e)
        {
            if (e.EventType == Ionic.Zip.ZipProgressEventType.Extracting_EntryBytesWritten)
            {
                //Only when we know the data is being written.
                Logger.Log(e.BytesTransferred + "/" + e.TotalBytesToTransfer); //Goes negative after some time??
                Logger.Log((e.BytesTransferred * 100) /(e.TotalBytesToTransfer) + "");
             }
        }





Here is the log file

18/02/2009 01:49:29:745 - By mkumar3 : 2147443244/2870042368
18/02/2009 01:49:29:745 - By mkumar3 : 0
18/02/2009 01:49:29:761 - By mkumar3 : 2147460652/2870042368
18/02/2009 01:49:29:761 - By mkumar3 : 0
18/02/2009 01:49:29:761 - By mkumar3 : 2147478060/2870042368
18/02/2009 01:49:29:761 - By mkumar3 : 0
18/02/2009 01:49:29:761 - By mkumar3 : -2147471828/2870042368
18/02/2009 01:49:29:761 - By mkumar3 : 0
18/02/2009 01:49:29:776 - By mkumar3 : -2147454420/2870042368
18/02/2009 01:49:29:776 - By mkumar3 : 0
18/02/2009 01:49:29:776 - By mkumar3 : -2147437012/2870042368
18/02/2009 01:49:29:776 - By mkumar3 : 0
18/02/2009 01:49:29:776 - By mkumar3 : -2147419604/2870042368
18/02/2009 01:49:29:776 - By mkumar3 : 0
18/02/2009 01:49:29:792 - By mkumar3 : -2147402196/2870042368
18/02/2009 01:49:29:792 - By mkumar3 : 0
18/02/2009 01:49:29:792 - By mkumar3 : -2147384788/2870042368
18/02/2009 01:49:29:792 - By mkumar3 : 0
18/02/2009 01:49:29:792 - By mkumar3 : -2147367380/2870042368
18/02/2009 01:49:29:807 - By mkumar3 : 0
18/02/2009 01:49:29:807 - By mkumar3 : -2147349972/2870042368
18/02/2009 01:49:29:807 - By mkumar3 : 0
18/02/2009 01:49:29:807 - By mkumar3 : -2147332564/2870042368
18/02/2009 01:49:29:807 - By mkumar3 : 0
18/02/2009 01:49:29:823 - By mkumar3 : -2147315156/2870042368
18/02/2009 01:49:29:823 - By mkumar3 : 0
18/02/2009 01:49:29:823 - By mkumar3 : -2147297748/2870042368
18/02/2009 01:49:29:823 - By mkumar3 : 0
18/02/2009 01:49:29:823 - By mkumar3 : -2147280340/2870042368
18/02/2009 01:49:29:823 - By mkumar3 : 0
18/02/2009 01:49:29:839 - By mkumar3 : -2147262932/2870042368
18/02/2009 01:49:29:839 - By mkumar3 : 0
18/02/2009 01:49:29:839 - By mkumar3 : -2147245524/2870042368
18/02/2009 01:49:29:839 - By mkumar3 : 0
18/02/2009 01:49:29:839 - By mkumar3 : -2147228116/2870042368
18/02/2009 01:49:29:839 - By mkumar3 : 0
18/02/2009 01:49:29:854 - By mkumar3 : -2147210708/2870042368
18/02/2009 01:49:29:854 - By mkumar3 : 0
18/02/2009 01:49:29:854 - By mkumar3 : -2147193300/2870042368




Please help guys as i have no clue why it would go negative?????
Coordinator
Feb 18, 2009 at 8:10 PM
Edited Feb 18, 2009 at 8:11 PM
There was a bug in v1.7 where the total byte count could go negative. 
It has been fixed.
Can you download the latest v1.7 binary and re-try?
Feb 19, 2009 at 1:13 PM
hi Cheeso,
Sorry but i tried this with 1.7.2.6 but i am still getting the negative count issue. Can you please have a look?


Ps : The delete problem is now resolved - thank you:)

Thanks again
Coordinator
Feb 19, 2009 at 10:13 PM
yes!  That bug is not completely fixed!
Feb 19, 2009 at 11:31 PM
When do you recon you would be able to fix that fully?


Thanks again for your hard work.
Coordinator
Feb 20, 2009 at 1:39 AM
Looking at it now. . . 
Coordinator
Feb 20, 2009 at 3:01 AM
Alag, Try v1.7.2.7.
Feb 20, 2009 at 8:54 AM
Edited Feb 24, 2009 at 12:51 PM
It works like a charm.


Your'e a star:)