Use built-in Zstandard on .NET 11 - with pipeline fix by kenjitamura · Pull Request #189 · ZoneTree/ZoneTree · GitHub
Skip to content

Use built-in Zstandard on .NET 11 - with pipeline fix - #189

Open
kenjitamura wants to merge 1 commit into
ZoneTree:mainfrom
kenjitamura:feat/net11-builtin-zstd
Open

kenjitamura wants to merge 1 commit into
ZoneTree:mainfrom
kenjitamura:feat/net11-builtin-zstd

Conversation

@kenjitamura

Copy link
Copy Markdown

Originally: #187

Fixes build pipeline while we wait for .Net 11 to reach GA.

Adds a path on .Net 11 to use its new built-in ZstandardEncoder introduced in System.IO.Compression and drops the dependency on ZstdSharp.Port for .Net 11+

.NET Libraries in .NET 11 Preview 1 - Release Notes

Full disclosure this was mostly AI and I just adjusted formatting and changed some questionable decisions it had made in the csproj.

I'll patch the commit to update dotnet.yml when .Net 11 reaches GA and this pull will be a stub until then.

@koculu

koculu commented Oct 17, 2026

Copy link
Copy Markdown
Member

.NET 11 adds Zstandard to System.IO.Compression (ZstandardEncoder /
ZstandardDecoder), so ZstdSharp.Port is no longer needed on net11.0.

- Add net11.0 to the target frameworks.
- Restrict the ZstdSharp.Port PackageReference to TFMs < net11.0. MSBuild's
  '<'/'>' operators are numeric-only, so TFM ordering goes through
  [MSBuild]::VersionLessThan on a numeric TFM version.
- Add a NET11_0_OR_GREATER code path in ZstdDataCompression using the static
  one-shot API; the ZstdSharp path is unchanged for older TFMs.

Frames remain standard Zstandard (magic 28 B5 2F FD), so data written by
either provider stays readable by the other.
@kenjitamura
kenjitamura force-pushed the feat/net11-builtin-zstd branch from b6cada0 to 586f491 Compare October 18, 2026 08:37
@kenjitamura

Copy link
Copy Markdown
Author

Saw the pipeline fix was only running unit tests against .net10 so updated the csproj for unit tests.

@koculu

koculu commented Oct 20, 2026

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants