Q: How to estimate the time for creating a zipfile in c# I've a method for creating zip file in my project and its working perfectly. I want to know is there any way to estimate the approximate time for creating that zip file.I know about StopWatch  but I dont think I can use that for my requirement. Any ideas????

A: This is really impossible to answer.
The amount of time a ZIP process will need depends on many factors, for instance:


*

*The compressability of the file(s) to compress. Point in case: XML files zip very nicely, MP3 files hardly at all.

*The amount of files to compress.

*The algorithm/implementation you use.

*Whether the Pc you are using is also doing other work (especially I/O).

*...


The best you can do is ZIP a portion of the total data (say, 10%), then extrapolate to get an estimated time, then re-evaluate that estimate, say, every 10% of data or so.
