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

feat(zip): make it possible to skip header tests #689

Merged
merged 4 commits into from Apr 28, 2022
Merged

Conversation

piksel
Copy link
Member

@piksel piksel commented Nov 19, 2021

This allows for skipping (some of) the local header tests performed when reading ZipFile entries.

Example:

using (var zipFile = new ZipFile(inputFile)){
	zipFile.SkipLocalEntryTestsOnLocate = true;
	foreach (var entry in zipFile)
	{
		// ...
	}
}

Also included are some refactoring done when investigating this. Mostly to make the code path easier to follow and provide better errors when things go wrong.

@codecov
Copy link

codecov bot commented Nov 19, 2021

Codecov Report

Merging #689 (fc92777) into master (aee3b44) will decrease coverage by 0.01%.
The diff coverage is 60.46%.

@@            Coverage Diff             @@
##           master     #689      +/-   ##
==========================================
- Coverage   73.83%   73.82%   -0.02%     
==========================================
  Files          69       69              
  Lines        8355     8354       -1     
==========================================
- Hits         6169     6167       -2     
- Misses       2186     2187       +1     
Impacted Files Coverage Δ
src/ICSharpCode.SharpZipLib/Zip/ZipConstants.cs 33.33% <0.00%> (-16.67%) ⬇️
src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs 77.24% <61.90%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aee3b44...fc92777. Read the comment docs.

@piksel piksel merged commit e3bb2f3 into master Apr 28, 2022
@piksel piksel deleted the feat/opt-ziptest branch April 28, 2022 12:13
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

1 participant