This repository was archived by the owner on Apr 9, 2024. It is now read-only.
Open
Conversation
fix initialization for _isSolid remove index initialization to extract all preceding files in a solid archive remove check for solid archive in extract by callback add tests for modified Extract methods using solid and non-solid archives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I started by asking why archives should be marked as Solid by default #161
Then I wondered by 7Zip wouldn't know how to extract a file from a Solid archive without going through the pain of asking 7Zip to extract every file in the archive preceding the file you want to extract (see the
private static uint[] SolidIndexes(uint[] indexes)method)? Based on my tests and reading the 7Zip source code, there does not appear to be any reason to do that, you can simply extract a file from Solid archive the same way you can from a normal archive.This PR fixes:
SolidIndexescode, and extract files from Solid archive the same as normal archivesExtractFilesby callback methodExtractFileCallbackArgsExtractToStream setterI had hoped these changes would make a huge difference in extracting files from Solid archives, but they are still very slow.
In addition to the unit tests, I tested extensively on large archives. For my test archive I used the VS Code source 1.66 source drop, and made 7Zip, 7Zip solid, RAR and RAR solid archives from those archives.