w3.CRC
1.0.0
dotnet add package w3.CRC --version 1.0.0
NuGet\Install-Package w3.CRC -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="w3.CRC" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="w3.CRC" Version="1.0.0" />
<PackageReference Include="w3.CRC" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add w3.CRC --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: w3.CRC, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package w3.CRC@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=w3.CRC&version=1.0.0
#tool nuget:?package=w3.CRC&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
w3.CRC - a simple to use CRC library
Supported CRC algorithms (atm):
- CRC8 ATM-2
- CRC16 CCITT
- CRC32c (Catagnolli)
CRC8, CRC16 and CRC32
Recommended for data with less than 256B
The CRC calculation is as follows:
byte[] data = BitConverter.GetBytes("Hello, world!"); // Input data - byte array
uint crc = CRC8.ComputeChecksum(data);
Along with the data validation:
using var stream = File.OpenRead("testFile.bin"); // Input data - also a byte array
bool isValid = CRC8.Validate(dataWithCRC);
CRC32Stream
The CRC32Stream is different as it uses streams as inputs instead of byte arrays to save memory space when calculating the CRC. The calculation is as follows:
var crcStream = new CRC32Stream(inputStream);
uint crc = crcStream.ComputeChecksum(8192, 0, (int)crcStream.Length);
And for the validation:
var crcStream = new CRC32Stream(inputStream);
bool isValid = crcStream.Validate(8192, 0, (int)crcStream.Length);
Planned CRCs:
- None
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 189 | 12/5/2025 |