Document breaking change: DeflateStream and GZipStream now encode empty payloads#51002
Merged
Document breaking change: DeflateStream and GZipStream now encode empty payloads#51002
Conversation
…yload encoding - Created breaking change article for .NET 11 Preview 1 - Updated 11.md index with new entry - Updated toc.yml with new article link - Added note to how-to-compress-and-extract-files.md referencing the breaking change The article documents the behavioral change where DeflateStream and GZipStream now always write headers and footers even for empty payloads, ensuring properly formatted compressed streams.
Copilot
AI
changed the title
[WIP] Fix DeflateStream and GZipStream encoding of empty payload
Document breaking change: DeflateStream and GZipStream now encode empty payloads
Jan 9, 2026
gewarren
approved these changes
Jan 9, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR documents a breaking change in .NET 11 Preview 1 where DeflateStream and GZipStream now always write compression headers and footers, even when no data is written. Previously, these streams produced no output for empty payloads.
- Creates comprehensive breaking change documentation with examples and migration guidance
- Updates navigation structure to include the new breaking change entry
- Includes whitespace cleanup in related documentation file
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
docs/core/compatibility/core-libraries/11/deflatestream-gzipstream-empty-payload.md |
New breaking change documentation describing the behavior change, including code examples and recommended actions |
docs/core/compatibility/toc.yml |
Adds TOC entry for the new breaking change article |
docs/core/compatibility/11.md |
Adds table entry linking to the new breaking change documentation |
docs/standard/io/how-to-compress-and-extract-files.md |
Whitespace cleanup (removes trailing spaces from YAML headers and links) |
docs/core/compatibility/core-libraries/11/deflatestream-gzipstream-empty-payload.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/11/deflatestream-gzipstream-empty-payload.md
Outdated
Show resolved
Hide resolved
rzikm
approved these changes
Jan 12, 2026
Member
rzikm
left a comment
There was a problem hiding this comment.
LGTM, thanks!
Copilot comments seem relevant.
…ream-empty-payload.md Co-authored-by: Copilot <[email protected]>
gewarren
reviewed
Jan 12, 2026
docs/core/compatibility/core-libraries/11/deflatestream-gzipstream-empty-payload.md
Outdated
Show resolved
Hide resolved
…ream-empty-payload.md
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.
In .NET 11 Preview 1,
DeflateStreamandGZipStreamchanged to always write compression headers and footers, even when no data is written. Previously, empty payloads produced no output.Changes
docs/core/compatibility/core-libraries/11/deflatestream-gzipstream-empty-payload.mdhow-to-compress-and-extract-files.mdExample
Workaround for previous behavior: special-case empty content to skip compression.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews