[API Proposal]: make ZipArchive implement IAsyncDisposable #79586
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.IO.Compression
Milestone
Background and motivation
Disposing of a
ZipArchive
writes content to the underlyingStream
. It would be nice to be able to do this as an async operation.In particular, #1560 (20 upvotes) describes how not being async in this case will throw errors when writing to a
ZipArchive
which is an ASP.NET Core response body stream (since those streams do not allow sync IO by default). Streaming directly into aZipArchive
is a nice way to dynamically generate large file exports (e.g. streaming from a database); it's a shame that this doesn't work out of the box without enabling sync IO.This change would also make partial progress towards supporting #1541 (95 upvotes).
API Proposal
API Usage
Alternative Designs
n/a
Risks
No response
The text was updated successfully, but these errors were encountered: