CRC-32C (Castagnoli) for C++ and .NET

Downloads

NuGet package is provided for both C++ and .NET projects. Alternatively, you can download plain ZIP file containing all the files. Sources are available via Bitbucket repositories.

NuGet package for C++

C++ NuGet package contains source code that is compiled together with your project. Your project will therefore have no DLL dependencies and there will be no C++ runtime issues. It however means that Debug build of your project will contain slower Debug build of CRC-32C.

PM> Install-Package Crc32C

Then continue to C++ tutorial.

NuGet package for .NET

.NET DLL is AnyCPU, but it automatically forwards all calls to one of the two native DLLs depending on whether the current process is 32-bit or 64-bit. The two native DLLs are embedded as resources and unpacked into temporary location before first use.

PM> Install-Package Crc32C.NET

Then continue to .NET tutorial.

Download ZIP

You can download ZIP file containing both the C++ DLLs (and associated LIBs and headers) and the .NET assembly here:

crc32c-hw-1.0.5.7z

Then continue to C++ tutorial or .NET tutorial.

Source code

Project CRC-32C for C++ and .NET
Version 1.0.5
CRC type CRC-32C (Castagnoli)
Polynomial 0x1EDC6F41 / 0x82F63B78
CRC features configurable initial value, chainable, no pre/post-processing, continuous bit order
Optimizations Intel CRC32 instruction (x3) in hardware
Sliced table-driven software fallback
Performance 20 GB/s in hardware
2 GB/s in software
NuGet Crc32C (C++), Crc32C.NET (.NET)
Download crc32c-hw-1.0.5.7z (C++ and .NET)
Source code crc32c-hw and Crc32C.NET on Bitbucket
License BSD license, zlib license
Credits Robert Važan, Mark Adler