Move Zstandard APIs from System.IO.Compression.Zstandard to System.IO.Compression#124634
Merged
rzikm merged 2 commits intodotnet:mainfrom Feb 24, 2026
Merged
Move Zstandard APIs from System.IO.Compression.Zstandard to System.IO.Compression#124634rzikm merged 2 commits intodotnet:mainfrom
rzikm merged 2 commits intodotnet:mainfrom
Conversation
….Compression Move Zstandard compression/decompression APIs from the separate System.IO.Compression.Zstandard assembly into the main System.IO.Compression assembly for better organization. Changes: - Move source files to src/System/IO/Compression/Zstandard/ subdirectory - Move test files to tests/Zstandard/ subdirectory - Add PNSE stubs for browser/wasi platforms - Update ref API with [UnsupportedOSPlatform] attributes - Merge resource strings into System.IO.Compression Strings.resx - Remove System.IO.Compression.Zstandard project reference from System.Net.Http - Remove System.IO.Compression.Zstandard from NetCoreAppLibrary.props and sfx.slnx - Delete the old System.IO.Compression.Zstandard directory Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @karelz, @dotnet/area-system-io-compression |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates Zstandard compression APIs into the main System.IO.Compression library, removing the separate System.IO.Compression.Zstandard assembly and updating build/test infrastructure accordingly.
Changes:
- Move Zstandard implementation and tests under
System.IO.Compression(including ref API surface updates). - Add browser/WASI
PlatformNotSupportedExceptionstubs while keeping full implementations on Windows/Unix TFMs. - Remove the old
System.IO.Compression.Zstandardproject artifacts and references (solutions, props, project references).
Reviewed changes
Copilot reviewed 23 out of 31 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/sfx.slnx | Removes System.IO.Compression.Zstandard ref project from the libraries solution. |
| src/libraries/System.Net.Http/src/System.Net.Http.csproj | Drops project reference to the removed System.IO.Compression.Zstandard project. |
| src/libraries/System.IO.Compression/tests/Zstandard/ZstandardTestUtils.cs | Adds shared helpers for Zstandard tests in the consolidated test project. |
| src/libraries/System.IO.Compression/tests/Zstandard/ZstandardEncoderDecoderTests.cs | Adds encoder/decoder coverage to System.IO.Compression tests. |
| src/libraries/System.IO.Compression/tests/Zstandard/ZstandardDictionaryTests.cs | Adds dictionary creation/training tests under System.IO.Compression. |
| src/libraries/System.IO.Compression/tests/Zstandard/ZstandardCompressionOptionsTests.cs | Adds validation tests for ZstandardCompressionOptions. |
| src/libraries/System.IO.Compression/tests/Zstandard/CompressionStreamUnitTests.Zstandard.cs | Adds ZstandardStream coverage integrated with existing stream test base. |
| src/libraries/System.IO.Compression/tests/System.IO.Compression.Tests.csproj | Integrates Zstandard test sources conditionally (excluding browser/WASI). |
| src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardUtils.cs | Adds shared internal helpers for Zstandard implementation. |
| src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.cs | Adds platform attributes on ZstandardStream. |
| src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.Decompress.cs | Adds decompression-side stream implementation under the consolidated assembly. |
| src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.Compress.cs | Adds compression-side stream implementation under the consolidated assembly. |
| src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardEncoder.cs | Adds platform attributes on ZstandardEncoder. |
| src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardDictionary.cs | Adds platform attributes on ZstandardDictionary. |
| src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardDecoder.cs | Adds platform attributes on ZstandardDecoder. |
| src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardCompressionOptions.cs | Adds platform attributes on ZstandardCompressionOptions. |
| src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/Zstandard.PlatformNotSupported.cs | Adds browser/WASI stubs throwing PlatformNotSupportedException. |
| src/libraries/System.IO.Compression/src/System.IO.Compression.csproj | Multi-target integration for Zstandard sources + stubs under System.IO.Compression. |
| src/libraries/System.IO.Compression/src/Resources/Strings.resx | Merges Zstandard resource strings into System.IO.Compression resources. |
| src/libraries/System.IO.Compression/ref/System.IO.Compression.cs | Adds Zstandard APIs to the System.IO.Compression reference surface with platform attributes. |
| src/libraries/System.IO.Compression/README.md | Updates README to reflect Zstandard support in System.IO.Compression. |
| src/libraries/System.IO.Compression/Directory.Build.props | Removes BOM/normalizes file header. |
| src/libraries/System.IO.Compression.Zstandard/tests/System.IO.Compression.Zstandard.Tests.csproj | Deletes old Zstandard test project (now integrated into System.IO.Compression tests). |
| src/libraries/System.IO.Compression.Zstandard/src/System.IO.Compression.Zstandard.csproj | Deletes old Zstandard implementation project (now merged into System.IO.Compression). |
| src/libraries/System.IO.Compression.Zstandard/src/Resources/Strings.resx | Deletes old resource file (strings moved to System.IO.Compression). |
| src/libraries/System.IO.Compression.Zstandard/ref/System.IO.Compression.Zstandard.csproj | Deletes old ref project. |
| src/libraries/System.IO.Compression.Zstandard/ref/System.IO.Compression.Zstandard.cs | Deletes old ref surface file (moved into System.IO.Compression). |
| src/libraries/System.IO.Compression.Zstandard/System.IO.Compression.Zstandard.slnx | Deletes old solution for the removed library. |
| src/libraries/System.IO.Compression.Zstandard/README.md | Deletes old library README (functionality now documented under System.IO.Compression). |
| src/libraries/System.IO.Compression.Zstandard/Directory.Build.props | Deletes old build props (no longer needed after consolidation). |
| src/libraries/NetCoreAppLibrary.props | Removes System.IO.Compression.Zstandard from the NetCoreApp library list. |
src/libraries/System.IO.Compression/src/System.IO.Compression.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
iremyux
pushed a commit
to iremyux/dotnet-runtime
that referenced
this pull request
Mar 2, 2026
….Compression (dotnet#124634) There is no real benefit from having the APIs in separate assembly because: - the Managed code size is rather small - it P/Invokes System.IO.Compression.Native just like System.IO.Compression managed assembly does - It would lead to circular dependency if we decide to implement dotnet#123532 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
There is no real benefit from having the APIs in separate assembly because: