Move ZstdSharp into SharpCompress - Complete Integration#1052
Merged
adamhathcock merged 35 commits intomasterfrom Dec 18, 2025
Merged
Move ZstdSharp into SharpCompress - Complete Integration#1052adamhathcock merged 35 commits intomasterfrom
adamhathcock merged 35 commits intomasterfrom
Conversation
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Move ZstdSharp into SharpCompress
Move ZstdSharp into SharpCompress - Initial Infrastructure
Nov 29, 2025
Owner
|
@copilot keep going |
…afe Methods Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Contributor
Author
Added significant infrastructure in commit 4021208:
The project now builds successfully with these foundational types. Continuing to add more files... |
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Owner
|
@copilot update from the latest master and move to the next step |
- Updated SharpCompress.csproj target frameworks from net48;net481;netstandard2.0;net6.0;net8.0 to net48;net481;netstandard2.0;net8.0;net10.0 - Updated test and build projects to use .NET 10 - Updated global.json to .NET 10 SDK - Updated CI workflow to use .NET 10 - Fixed deprecated Rfc2898DeriveBytes constructor for .NET 10 (SYSLIB0060) - Updated package description and README to reflect new supported frameworks - Updated package versions for .NET 10 compatibility Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
- Updated target frameworks to net48;net8.0;net10.0 only - Removed netstandard2.0 and net481 package conditions - Updated conditional compilation to use NETFRAMEWORK only - Updated package description and README Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
…dling Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…xplicit DirectoryEntry case Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
This was referenced Jan 5, 2026
This was referenced Jan 12, 2026
This was referenced Jan 19, 2026
This was referenced Jan 26, 2026
This was referenced Feb 11, 2026
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.
Completes the full integration of ZstdSharp directly into SharpCompress, removing the external ZstdSharp.Port dependency (addresses #1030, started in #949).
Overview
This PR integrates all ~217 ZstdSharp implementation files into SharpCompress, providing a fully self-contained ZStandard compression/decompression implementation without external dependencies.
Changes Made
Core Infrastructure
ZSTD_ErrorCodeenum,ZstdExceptionclass,ThrowHelperwith extension methodsUnsafeHelperwith malloc, calloc, free, memcpy, memset, memmove, memcmpZSTD_inBuffer_s,ZSTD_outBuffer_s,ZSTD_customMemZSTD_cParameter,ZSTD_compressionParameters,ZSTD_strategy) and decompression (ZSTD_dParameter) parametersZSTD_frameType_e,ZSTD_frameHeader,ZSTD_frameParameters,ZSTD_parametersZSTD_dictContentType_e,ZSTD_dictLoadMethod_eZSTD_EndDirective,ZSTD_ResetDirectiveComplete Unsafe Implementation (~217 files)
Fse.cs,FseCompress.cs,FseDecompress.cs)Huf.cs,HufCompress.cs,HufDecompress.cs)Cover.cs,Fastcover.cs,Zdict.cs)ZstdCompress.cs,ZstdCompressInternal.cs,ZstdCompressLiterals.cs,ZstdCompressSequences.cs,ZstdCompressSuperblock.csZstdDecompress.cs,ZstdDecompressBlock.cs,ZstdDecompressInternal.csZstdFast.cs,ZstdDoubleFast.cs,ZstdLazy.cs,ZstdOpt.csZstdLdm.csEntropyCommon.cs,Bitstream.csZSTD_CCtx_s.cs,ZSTD_DCtx_s.cs, compression/decompression context structuresZstdmtCompress.cs,Pool.csXxhash.csfor checksumsHigh-Level API
Unwrap()methods and dictionary supportWrap()methodsSafeCctxHandleandSafeDctxHandlefor safe resource managementJobThreadPool,SynchronizationWrapper,UnmanagedObject,Constants,BitOperationsDependency Removal
ZstdSharp.Portpackage reference fromSharpCompress.csprojCommon/Zip/ZipFilePart.cs: Changed namespace fromZstdSharptoSharpCompress.Compressors.ZStandardCompressors/LZMA/Registry.cs: Updated namespace usageWriters/Zip/ZipWriter.cs: Changednew ZstdSharp.CompressionStream(...)tonew CompressionStream(...)Bug Fixes and Improvements
Thread.VolatileRead→Volatile.ReadinZstdDecompressBlock.csZstandardConstants.csBuild Status
✅ Project builds successfully on all targets (net48, net8.0, net10.0)
✅ No warnings or errors
✅ No external ZstdSharp dependency required
✅ Code formatted with CSharpier 1.2.3
Files Changed
SharpCompress now has a complete, self-contained ZStandard implementation.
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.