mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-15 05:26:01 +00:00
[PR #1121] More async for ZipReader and ZipWriter #1551
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/1121
State: closed
Merged: Yes
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]