mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-09 21:24:08 +00:00
Proper Decompression Progress Calculation #362
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chefbennyj1 on GitHub (Jul 20, 2019).
Well, this was not properly documented anywhere on the Internet. There were some possibilities, but they wouldn't calculate properly. This is a working Progress percentage calculation for decompressing archives in SharpCompress.
This is taken from my Decompression Class, so there is extra information in the logic. However, what is important is casting the 'CompressedBytesRead' to double, and dividing it into the total size of the archive which should also be cast to double.
`
`
If anyone has something better, I'm all ears, but this will work to implement a progress bar.
@adamhathcock commented on GitHub (Aug 20, 2019):
Probably need to rethink how progress is reported but this uses the hooks I have as intended.
@DineshSolanki commented on GitHub (Jul 19, 2024):
How do I get the total progress, this only provides progress for individual entries