-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Progress issue on multipart RAR archives #100
Comments
Thanks for reporting this. We currently only read the size of the given input file as the total size. I guess we need to do something like your implementation. Will get back to it. |
The problem with this is that we need to walk the entire archive just for the total size which is waste of time, don't you think? |
Thanks for your reply! The code above is from the libarchive example and did work in my test project. Just for fun i also did try a ~86 GB multipart RAR archive split in 100 MB parts. It did start extraction right away, no major compute time for this so it can't be as bad. I guess reading the file header is quick, even on a 4 core pc and files stored a "slow" hdd. Also tested 7zip and unrar (had to get an older compiler for it) itself on this, also no issues regarding wasting time to read headers. Not sure and id did not check the code on this but usually the header is a limited space around the start of a file and there is no need to read in the whole file itself only the limited data a header can contain, that would explain the fast extraction of header information. |
Small update on my side. Guess i'll stay with libarchive for now. Since the archive_read_open_filenames accepts a list of (RAR) files and works perfectly so far. Only downside is: lazy me has to code a lot more :( On the upside, i only need extraction for ZIP and RAR archives :) Did check your code in qarchiveextractor_p.cc and it looks like you do not use the libarchive functions archive_read_open_filename or archive_read_open_filenames alt all, instead working with QFile and QFileInfo. I was up to implement it myself but that complicates it. |
@DoctorW00 Sorry for the late reply, I was caught up at work.
Yes, there is reason for it, it is to support opening all types of QIODevice not just filenames, also this is safer. Yeah, let me work on it, its not that hard to implement. |
Thanks, looking forward for an update supporting multi part archives. |
Hey, great project!
Got some issues on multipart RAR archives. The progress (in my case) only shows 1/5 of total (got 5 RAR archives).
I've used your example code from https://github.com/antony-jr/QArchive/tree/master/examples/disk_extractor - extraction always works single and multipart RAR archives. For testing i uses a ~500mb file packed in 5 RAR archives about 100mb each file. In this scenario, the progress counter ends at 20% but 100% was extracted.
Guess the problem could be around
QArchive/src/qarchiveextractor_p.cc
Line 107 in 1467a3e
If i use libarchive directly i use a loop to get all the total size of the RAR archive(s).
The text was updated successfully, but these errors were encountered: