The algorithms are:
zip: establish the number of bytes to be zipped (progress max) by looking at all the file sizes. Then fire an event based on the buffer size.
unzip: look at the size of the zip archive (progress max). then fire an event from the unzip buffer.
In both cases the progress formula is totalsize(100%) * buffersprocessed div Buffersize. Add one for the last buffer (remainder) to reach 100%.
(multiply before the integer divide! and scale to percentage)