![]() |
VOOZH | about |
dotnet add package GrindCore.SharpCompress --version 0.48.0
NuGet\Install-Package GrindCore.SharpCompress -Version 0.48.0
<PackageReference Include="GrindCore.SharpCompress" Version="0.48.0" />
<PackageVersion Include="GrindCore.SharpCompress" Version="0.48.0" />Directory.Packages.props
<PackageReference Include="GrindCore.SharpCompress" />Project file
paket add GrindCore.SharpCompress --version 0.48.0
#r "nuget: GrindCore.SharpCompress, 0.48.0"
#:package GrindCore.SharpCompress@0.48.0
#addin nuget:?package=GrindCore.SharpCompress&version=0.48.0Install as a Cake Addin
#tool nuget:?package=GrindCore.SharpCompress&version=0.48.0Install as a Cake Tool
GrindCore.SharpCompress is an enhanced version of SharpCompress that integrates GrindCore native compression. This project delivers native compression support built using the System.IO.Compression pattern, utilizing compression algorithms directly from their original C implementations.
This fork replaces GZip, LZMA, Deflate, ZStandard, LZ4, and Brotli implementations with native C streams from GrindCore, providing significant performance improvements while maintaining full API compatibility.
Based on SharpCompress 0.48.0 — includes all upstream features plus native compression.
For more in-depth information, see .
<PackageReference Include="GrindCore.SharpCompress" Version="0.48.0" />
| Format | Read | Write | Native Performance | Notes |
|---|---|---|---|---|
| ZIP | ✅ | ✅ | ✅ (Deflate, ZStd, LZMA) | Zip64, PKWare/WinZip AES encryption |
| TAR | ✅ | ✅ | ✅ (with compression) | GZip, BZip2, LZip, XZ, ZStandard |
| GZIP | ✅ | ✅ | ✅ | Native ZLib-NG |
| BZIP2 | ✅ | ✅ | ❌ (managed) | Original C# implementation |
| 7ZIP | ✅ | ✅ | ✅ (LZMA/LZMA2) | Non-solid write, seekable streams required |
| RAR | ✅ | ❌ | N/A | RAR4 and RAR5, solid archives supported |
| LZIP | ✅ | ✅ | ✅ | Native LZMA |
| XZ | ✅ | ❌ | ✅ | Native LZMA2 decompression |
| ACE | ✅ | ❌ | N/A | Read-only |
| ARJ | ✅ | ❌ | N/A | Read-only |
| Algorithm | Levels | Native | Notes |
|---|---|---|---|
| Deflate | 1-9 | ✅ ZLib-NG v2.2.1 | Used in ZIP, GZip, Tar.GZip |
| LZMA/LZMA2 | 1-9 | ✅ v25.1.0 | Block and Solid modes, 7zip writing |
| ZStandard | 1-22 | ✅ v1.5.7 | ZIP, TAR, standalone |
| LZ4 | 1-12 | ✅ v1.10.0 | 7zip decompression, standalone |
| Brotli | 1-11 | ✅ v1.1.0 | 7zip decompression, standalone |
| BZip2 | Fixed | ❌ | Managed C# implementation |
| PPMd | Fixed | ❌ | Managed C# implementation |
| Deflate64 | N/A | ❌ | Decompression only |
| Shrink/Implode/Reduce | N/A | ❌ | Legacy ZIP decompression only |
SevenZipWriter for creating 7z archives with LZMA or LZMA2 compressionWriterFactory.OpenAsyncWriterArchiveFactory.GetArchiveInformation() — detect archive type without fully openingArrayPool<byte>-backed memory stream for reduced GC pressureExtractionOptionsZipArchive, TarArchive, SevenZipArchive, etc.)ZipReader, TarReader, etc.)ZipWriter, TarWriter, SevenZipWriter, etc.)CancellationToken throughoutReaderFactory.OpenReader() / ArchiveFactory.OpenArchive()CompressionBufferSize = -1)GrindCore native implementations provide measurable improvements over managed C#:
Native implementations leverage modern CPU instruction sets (AVX2, SSE4) where available.
This is a drop-in replacement. Change your package reference:
<PackageReference Include="SharpCompress" Version="0.48.0" />
<PackageReference Include="GrindCore.SharpCompress" Version="0.48.0" />
No code changes required. Existing SharpCompress code benefits from native performance automatically.
// Write a ZIP with ZStandard compression
var options = new WriterOptions(CompressionType.ZStandard) { CompressionLevel = 6 };
using var writer = WriterFactory.OpenWriter(outputStream, ArchiveType.Zip, options);
writer.Write("file.txt", inputStream, DateTime.Now);
// Write a 7zip archive with LZMA2
var options7z = new WriterOptions(CompressionType.LZMA2) { CompressionLevel = 9 };
using var writer7z = WriterFactory.OpenWriter(outputStream, ArchiveType.SevenZip, options7z);
writer7z.Write("data.bin", inputStream, DateTime.Now);
// LZMA2 Solid Mode for maximum compression
var solidOptions = new WriterOptions(CompressionType.LZMA2)
{
CompressionBufferSize = -1 // Solid mode
};
// Read any archive format (auto-detect)
using var archive = ArchiveFactory.OpenArchive(inputStream);
foreach (var entry in archive.Entries.Where(e => !e.IsDirectory))
{
entry.WriteToDirectory(outputDir);
}
GrindCore.SharpCompress.dll
→ GrindCore.net.dll (.NET stream wrappers)
→ GrindCore.dll (Native C library)
When UseGrindCore=true (default), native stream implementations replace the managed ones at compile time. Set UseGrindCore=false to build with pure managed implementations (matching upstream SharpCompress behaviour).
Contributions welcome. Areas of interest:
Please use GitHub issues for support requests.
MIT License — same as the original SharpCompress project. Native libraries are licensed as specified in GrindCore documentation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 is compatible. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 is compatible. net481 net481 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 2 NuGet packages that depend on GrindCore.SharpCompress:
| Package | Downloads |
|---|---|
|
SabreTools.Serialization
Serialization and deserialization helpers for various types |
|
|
BinaryObjectScanner
Protection scanning library |
Showing the top 3 popular GitHub repositories that depend on GrindCore.SharpCompress:
| Repository | Stars |
|---|---|
|
SabreTools/MPF
Redumper/Aaru/DiscImageCreator GUI in C#
|
|
|
SabreTools/SabreTools
DAT management tool with advanced editing and sorting features
|
|
|
SabreTools/BinaryObjectScanner
C# protection, packer, and archive scanning library
|
| Version | Downloads | Last Updated |
|---|---|---|
| 0.48.0 | 400 | 5/8/2026 |
| 0.46.2 | 1,924 | 2/21/2026 |
| 0.44.5 | 134 | 2/18/2026 |
| 0.42.0 | 405 | 12/3/2025 |
| 0.41.3 | 509 | 11/30/2025 |
| 0.41.2 | 237 | 11/26/2025 |
| 0.41.1 | 852 | 11/25/2025 |
| 0.41.0 | 299 | 11/23/2025 |
| 0.40.4-alpha | 1,806 | 9/29/2025 |
| 0.40.3-alpha | 422 | 9/6/2025 |
| 0.40.2-alpha | 183 | 8/23/2025 |
| 0.40.1-alpha | 224 | 8/21/2025 |
| 0.40.0-alpha | 315 | 7/28/2025 |