Comments (8)
After investigating the source code, it looks like we might want to look at SetCompleted from IArchiveUpdateCallback. I have it printing out and I am getting constant byte updates from here - I imagine this is amount of archive generated at that point.
I am also getting some progress when it's outputting to disk too from that call - perhaps this is the overall archive percentage. I'm not sure what the values mean (they seem to not be specifically bytes).
This is in COM.cs. I will continue to investigate.
Edit: It seems SetCompleted is called during all 3 steps I listed above, but it is different values than the BytesWritten (which is what the compressing callback is looking at). I'm not sure what it is, but I am going to test seeing what the SetTotal() and SetCompleted() methods combined show me. Maybe 7z is precalculating the amount of operations or something it has to do (like reading source files in chunks, compression passes, and disk writes in chunks) and that is how it shows the progressbar.
from sevenzipsharp.
Sorry for the barrage of comments and emails. It is indeed SetTotal and SetCompleted. I have extended my implementation of SevenZipSharp to have a OnProgressing() callback, which uses the SetTotal (sets a _total variable in the ArchiveUpdateCallback object). When SetCompleted is called, it raises this event. I can submit some code - I am not fully sure of the proxy styling + disabling fast compression without events. I added a DetailedProgressEventArgs that returns the Total and the Amount Completed (both ulong). Having progress as a byte between 0 and 100 is not as useful as having a large value I can work with, especially when it can take several seconds between a full jump in percentage.
I will prepare some code for a PR - I expect it will take a fair amount of work to massage it into the code style for this repository. I made it a new event instead of Compressing() as I did not want to break backwards compatibility, but I am sure there is a better way to do it.
from sevenzipsharp.
Haven't forgotten about this. I am still building my app and want to test it there first before I put in a PR.
from sevenzipsharp.
Hi, do you think this could be related to this:
#77
from sevenzipsharp.
Could be. I'm still planning on making PR to this repo with this code. Essentially, if you want accurate progress, you need to setup a OnProgressing() handler, as it's the actual progress values. the progress events are already part of the library but they don't seem to be used. (SetCompleted() and SetTotal() in the archiveupdatecallback and... archivecompressingcallback? files)
Not sure what this library is hooked up to, it's like... running at full capacity of buffers or something (like when 7z is using max memory it will use during an operation). I'll see if I can make PR this weekend to this repo for this feature.
If you look at how 7z behaves when you compress a large archive, you can see it goes through a lot of files quickly and then just says "compressing X" for a long time. This library seems to be hooked up to that logic rather than what powers the progress bar.
from sevenzipsharp.
Ok, thanks for the information. I will try using the OnProgressing handler.
from sevenzipsharp.
from sevenzipsharp.
@Mgamerz @VisualUser Hello, do you have any news on this problem?
from sevenzipsharp.
Related Issues (20)
- SevenZipSharp library not working on Xamarin forms
- Extract NSIS no output using SevenShipSharp while 7zip GUI has output
- Unable open archive file for spanned zip file
- Change license to MIT
- Stuck at a certain percent while extracting encrypted 7z file
- Windows Virus Scanner - Trojan:Win32/Wacatac.B!m in Squid-Box.SevenZipSharp Version=1.5.1.15 HOT 3
- version 1.6.0.22 is unusable for extraction HOT 2
- SevenZipExtractor.ExtractFileAsync(int, Stream) fails when created with leaveOpen == false
- Copyright HOT 2
- Execution has failed due to an internal SevenZipSharp issue (0x800700ce / -2147024690). HOT 1
- VHD support HOT 1
- Archive extraction should be cancelable
- The library does not seem to support AOT compilation?
- Feature Request: Support additional compression algorithms (7zip-zstd)
- Trying to add files to an existing ZIP archive creates a NEW archive HOT 1
- Exception when calling CompressDirectory with searchPattern that returns empty file collection
- Getting Corrupted file exception for proper archives HOT 1
- How to append files to a splitted archive?
- Error during extracting the file that I just compressed HOT 5
- Publishing a new release HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sevenzipsharp.