mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #978] Add comprehensive async/await support for Stream I/O operations #1399
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/978
State: closed
Merged: Yes
Extends PR #976 with deep async support for compression streams (EntryStream, ZlibStream, DeflateStream, GZipStream) per maintainer request to "go deeper" on async implementation.
Changes
Core Stream Infrastructure
EntryStream: AddedReadAsync,FlushAsync,SkipEntryAsync,DisposeAsyncZlibStream,DeflateStream,GZipStream: AddedReadAsync,WriteAsync,FlushAsync,DisposeAsyncZlibBaseStream: Added async methods withfinishAsyncfor proper async teardownUtility: AddedSkipAsync()overload without length parameterFrom PR #976 (Integrated)
IReader.WriteEntryToAsync(),IWriter.WriteAsync(),IArchiveEntry.OpenEntryStreamAsync()WriteAllToDirectoryAsync(),WriteAllAsync()SharpCompressStream,SourceStreamasync supportImplementation Notes
ConfigureAwait(false)IAsyncDisposablefor .NET 6+ via conditional compilationMemory<T>/ReadOnlyMemory<T>overloads for modern .NETUsage
Test Coverage
Added 2 async-specific tests validating EntryStream and compression stream async operations. Total: 478 tests passing.
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.