Quantcast
Channel: sharpcompress Discussions Rss Feed
Viewing all articles
Browse latest Browse all 239

New Post: Monitoring zip progress with delegates?

$
0
0
I used my own method to know the progress. May be not the best one but it works fine for me.:
var archive = SharpCompress.Archive.ArchiveFactory.Open(fileStream);
int totalFileCount = archive.Entries.Count();
int fileCount = 0;
int currentPercentage = 0;
                
foreach (var entry in archive.Entries)
{
    ///Your action

    fileCount++;
    currentPercentage = (fileCount * 100)/ totalFileCount;
    //Update UI or Delegate etc.
}

Viewing all articles
Browse latest Browse all 239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>