Skip to content
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

Multivolume extract no Intermediate file #110

Merged
merged 15 commits into from
Dec 30, 2022
Merged

Conversation

anywhereyang
Copy link
Contributor

No description provided.

En: Multivolume extract  no  Intermediate file
ZH-CN: 多卷功能实现,不用生成中间文件
 Multivolume extract    no  Intermediate file
@rikyoz rikyoz self-requested a review November 16, 2022 08:07
@rikyoz rikyoz self-assigned this Nov 16, 2022
@rikyoz
Copy link
Owner

rikyoz commented Dec 5, 2022

Hi!
Thank you for this PR, and sorry for the late reply!
I don't know if you have already looked at them, but I allowed myself to make some further changes to your code.
Specifically:

  • I added some missing includes that prevented the compilation of the library (1c4c76f).
  • I made the code use the safer sprintf_s function rather than sprintf (b6b4470).
  • I removed the necessity of conversions between std::wstring/std::string strings (6fca420).
    • Now, the new code uses only the std::wstring string type (as the rest of the library), and hence it uses the swprintf_s function.
  • I changed the code to avoid unnecessary string allocation when checking if an archive is multi-volume (4acacff).
  • I made the code work also for non-7z multi-volume archives (f364174).
    • For some reason, the code works for all archive formats except for bzip2 and xz archives. I'll need to investigate this further.
  • I changed the code to use a more straightforward while loop instead of a do-while loop (2a0b9ae).
  • I moved the input stream initialization code to a separate function (48d6fe1).
  • I removed some unused code (92c0b56 and 96159d2) and fixed the code formatting (3adbd6c).
  • I updated the project files (f6db53b).
  • I modified the code to make it open multi-volume archives as whole archives only if the archive format is not BitFormat::Split (8e4d71c).

Please note that, even after all my changes, the code is incompatible with the next version of the library (which, at the moment, is on the develop branch).
Specifically:

  • The code conflicts with the code changes I already introduced for the new version.
  • Due to licensing issues, I cannot include the 7-zip's CMultiStream class.
  • I'm already working on providing the same functionality for the next version, hopefully with a more generic approach that may include the recursive extraction of archives like .tar.gz without intermediate files.

So, if I merge this PR with the master branch, please consider that all these changes will be overwritten when the next version of the library is released (and the develop branch is merged with the master one).

@anywhereyang
Copy link
Contributor Author

ok,you can do anything on my code, i will update your new version to my code

@rikyoz rikyoz merged commit 47592e5 into rikyoz:master Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants