Fix GZip write async#1320
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses async GZip archive writing by enabling OpenEntryStreamAsync to be overridden for writable GZip entries, preventing the NotImplementedException seen during SaveToAsync for newly-created GZip archives. It also adds an async round-trip test covering create → save → open → extract.
Changes:
- Made
GZipArchiveEntry.OpenEntryStreamAsyncvirtualso writable entries can override async stream opening. - Implemented
GZipWritableArchiveEntry.OpenEntryStreamAsyncto return a stream without touchingParts(which is not implemented for writable entries). - Added
GZip_Create_New_Asyncto validate async create/save/open/extract behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/SharpCompress.Test/GZip/GZipArchiveAsyncTests.cs | Adds an async GZip create/save/open/extract test (needs fixes for stream disposal / minor cleanup). |
| src/SharpCompress/Archives/GZip/GZipWritableArchiveEntry.cs | Overrides OpenEntryStreamAsync for writable GZip entries to support async save. |
| src/SharpCompress/Archives/GZip/GZipArchiveEntry.cs | Makes OpenEntryStreamAsync virtual to allow writable-entry override. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This was referenced May 14, 2026
github-actions Bot
pushed a commit
to Stella-sea/ryujinx-admin
that referenced
this pull request
May 15, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [SharpCompress](https://github.com/adamhathcock/sharpcompress) | `0.48.0` → `0.48.1` |  |  | --- ### Release Notes <details> <summary>adamhathcock/sharpcompress (SharpCompress)</summary> ### [`v0.48.1`](https://github.com/adamhathcock/sharpcompress/releases/tag/0.48.1): - GZip writing fix [Compare Source](adamhathcock/sharpcompress@0.48.0...0.48.1) #### What's Changed - release test cleanup by [@​adamhathcock](https://github.com/adamhathcock) in [#​1322](adamhathcock/sharpcompress#1322) - Fix GZip write async by [@​adamhathcock](https://github.com/adamhathcock) in [#​1320](adamhathcock/sharpcompress#1320) **Full Changelog**: <adamhathcock/sharpcompress@0.48.0...0.48.1> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNzguMCIsInVwZGF0ZWRJblZlciI6IjQzLjE3OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=--> Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/97
This was referenced May 16, 2026
This was referenced May 18, 2026
Merged
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.
fixes #1316
same as #1319
This pull request adds asynchronous support for opening GZip archive entry streams and introduces a new async test for GZip archive creation and extraction. The main changes involve implementing an asynchronous version of
OpenEntryStreamin both the base and writable GZip archive entry classes, updating usings for async functionality, and adding comprehensive tests to validate the new async operations.Async support for GZip archive entries:
OpenEntryStreamAsyncavirtualmethod inGZipArchiveEntry, allowing for override and enabling async stream opening for GZip entries.overrideofOpenEntryStreamAsyncinGZipWritableArchiveEntry, providing cancellation support and returning aValueTask<Stream>.usingstatements forSystem.ThreadingandSystem.Threading.TasksinGZipWritableArchiveEntry.csto support async methods.Testing improvements:
GZip_Create_New_AsyncinGZipArchiveAsyncTests.csto verify asynchronous archive creation, saving, extraction, and file comparison.