-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.breaking-changeIndicates a .NET Core breaking changeIndicates a .NET Core breaking change
Description
Description
Deflate and GZip compression formats include delimiters for start and end of compressed data. The right way to compress empty payload with these formats includes only those delimiters.
Version
.NET 11 Preview 1
Previous behavior
DeflateStream and GZipStream would not produce any output if no data was written.
New behavior
DeflateStream and GZipStream always write headers and footers to the output.
Type of breaking change
- Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
- Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
- Behavioral change: Existing binaries might behave differently at run time.
Reason for change
Some tools do not correctly react to empty content and always expect the compressed content to contain at least the appropriate header and footer.
Recommended action
If previous behavior is desired, we recommend special casing empty content to not try to compress it via DeflateStream or GZipStream
Feature area
Core .NET libraries
Affected APIs
DeflateStream
GZipStream
Reactions are currently unavailable
Metadata
Metadata
Labels
📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.breaking-changeIndicates a .NET Core breaking changeIndicates a .NET Core breaking change