This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
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:
SolidIndexes
code, and extract files from Solid archive the same as normal archivesExtractFiles
by callback methodExtractFileCallbackArgs
ExtractToStream 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.