Native Compression and Hashing library built the System.IO.Compression way.
$ dotnet add package GrindCoreAn AOT-compatible compression and hashing library built in the System.IO.Compression style—providing a managed .NET wrapper around the GrindCore Native library.
Published on NuGet as GrindCore with support for multiple platforms.
⚠️ Important Notice: GrindCore is still in the early days of broader adoption. It is actively being tested and refined, but it is already being used in production scenarios and appears to be stable. Please thoroughly test in your specific use cases and report any issues encountered.
For usage examples and API patterns, see the Getting Started Guide.
For more in-depth information, see .
dotnet add package GrindCore
GrindCore is an innovative library designed to streamline and enhance compression processes in dotnet applications. It aims to tackle prevalent issues such as performance degradation and outdated implementations when native code updates frequently. By unifying multiple C forks into a single, multiplatform library, GrindCore achieves a cohesive and efficient solution.
The primary goal of GrindCore is to deliver a maintainable compression and hashing solution for dotnet applications. Leveraging the exact method used to build C in the dotnet runtime ensures a robust approach. By preserving precise compression algorithms for key versions, GrindCore guarantees compatibility and reliability for projects requiring byte-perfect output.
net10.0;net9.0;net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netstandard2.1;netstandard2.0;net48;net47;net46;net45;net40;net35GrindCore implements compression in two forms: Stream-based and Block-based.
All compression streams inherit from the CompressionStream class, ensuring consistent behavior and shared functionality across implementations.
Similarly, all block-based compression implementations inherit from CompressionBlock, maintaining structured handling of compression operations.
To simplify instance creation, GrindCore provides:
CompressionStreamFactory, allowing easy instantiation of stream-based compression classes.CompressionBlockFactory, offering a straightforward mechanism for initializing block-based compression instances.All native compression algorithms are directly built into the GrindCore Native project—no third-party binaries are used or required. The following algorithms are compiled from source as part of the native library, ensuring full integration, security, and maintainability:
Notes:
.Position (compressed) and .PositionFullSize (uncompressed) properties for accurate progress tracking.Hashes inherit from HashAlgorithm allowing them to be used with CryptoStream for standard .Net use.
A comprehensive list of test statuses for various platforms is available below. For a quick summary: GrindCore is being actively tested across major platforms including Linux ARM64, Linux ARM, Linux x64, macOS x64, macOS ARM64, Windows x64, Windows x86, and Windows ARM64.
| Platform | Unit Test Status |
|---|---|
| Linux ARM64 | |
| Linux ARM | |
| Linux x64 | |
| macOS x64 | |
| macOS ARM64 | |
| Windows x86 | |
| Windows x64 | |
| Windows ARM64 |
GrindCore integrates robust solutions from several key projects:
GrindCore is designed to overcome several known complications in the dotnet ecosystem:
compress2 from zlib/deflate, providing more options and flexibility for developers.Several enhancements and additional features could be introduced to further improve GrindCore. While these may be addressed over time, listing them here serves to communicate known gaps and encourage community contributions:
GrindCore is on a journey to create a more reliable and efficient compression solution for dotnet. The community's contributions and collaboration are welcomed.