Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Solid archives #164

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Solid archives #164

wants to merge 3 commits into from

Conversation

doug24
Copy link

@doug24 doug24 commented May 20, 2022

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:

  • Change the default setting for archives to not Solid, and only archives with the Solid property set are marked as Solid
  • Remove the SolidIndexes code, and extract files from Solid archive the same as normal archives
  • Remove the Solid archive exception from the ExtractFiles by callback method
  • Fix a bug in the ExtractFileCallbackArgs ExtractToStream setter
  • Add unit tests and unit test files for all changes
  • Make all the unit tests runnable from Visual Studio

I 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.

doug24 added 3 commits April 29, 2022 16:29
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant