More async for ZipReader and ZipWriter#1121
Merged
adamhathcock merged 56 commits intomasterfrom Jan 12, 2026
Merged
Conversation
Co-authored-by: adamhathcock <[email protected]>
Co-authored-by: adamhathcock <[email protected]>
Co-authored-by: adamhathcock <[email protected]>
…d-stream-async-read
- Added IsArchiveAsync interface method to IFactory - Implemented async versions of IsZipFile, IsZipMulti, IsGZipFile - Updated ZipFactory and GZipFactory to override IsArchiveAsync - Updated ReaderFactory.OpenAsync to use IsArchiveAsync - Fixed Zip_Reader_Disposal_Test2_Async to use ReaderFactory.OpenAsync - Fixed TestStream to properly forward ReadAsync calls - Removed BufferedStream wrapping from AsyncBinaryReader as it uses sync Read - Added default implementation in Factory base class Co-authored-by: adamhathcock <[email protected]>
Co-authored-by: adamhathcock <[email protected]>
Co-authored-by: adamhathcock <[email protected]>
Co-authored-by: adamhathcock <[email protected]>
Co-authored-by: adamhathcock <[email protected]>
… methods Co-authored-by: adamhathcock <[email protected]>
…plementations Consolidate stream extension methods and simplify with framework methods
# Conflicts: # src/SharpCompress/Utility.cs
This was referenced Feb 12, 2026
Closed
This was referenced Feb 23, 2026
Closed
This was referenced Mar 2, 2026
Closed
This was referenced Mar 9, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces comprehensive support for asynchronous operations in the archive handling codebase, making it possible to open, read, and extract archives using async/await patterns. It adds new async APIs, refactors existing classes to support asynchronous enumeration and disposal, and updates package references to include analyzers that help enforce best practices for threading and async code.
Async API Extensions and Core Refactoring:
OpenAsync) inArchiveFactory, supporting various input types (streams, file paths, file collections) and implemented corresponding async factory resolution logic. [1] [2] [3] [4] [5] [6] [7]AbstractArchiveto implementIAsyncArchive, introducing async enumeration of entries and volumes, async disposal, and async extraction methods. Also added support for async reader creation and solid extraction. [1] [2] [3] [4] [5] [6]AbstractWritableArchiveto useValueTaskfor its async save methods, improving performance and consistency with new async patterns. [1] [2]Dependency and Analyzer Updates:
Microsoft.VisualStudio.Threading.Analyzersand updated package references to useGlobalPackageReferencefor threading and async best practices enforcement. Updated lock files accordingly. [1] [2]VSTHRD110,VSTHRD107) to error in.editorconfigto enforce correct threading usage.Miscellaneous Improvements:
AutoArchiveFactorytointernaland added async methods for opening archives and checking archive types, delegating to the new async APIs inArchiveFactory. [1] [2]