Show / Hide Table of Contents

Class CRC32Calculator

Provides access to low-level CRC32 calculation methods.

Inheritance
System.Object
CRC32Calculator
Namespace: FFT.CRC
Assembly: FFT.CRC.dll
Syntax
public static class CRC32Calculator : object

Fields

| Improve this Doc View Source

SEED

The starting value of a CRC32 calculation.

Declaration
public const uint SEED = null
Field Value
Type Description
System.UInt32

Methods

| Improve this Doc View Source

Add(ref UInt32, ReadOnlySpan<Byte>)

Updates the running CRC32 calculation value. Call this method each time new data arrives, passing in the new bytes. You are responsible to maintain your own copy of value until the calculation process is complete.

Declaration
public static void Add(ref uint value, ReadOnlySpan<byte> bytes)
Parameters
Type Name Description
System.UInt32 value

The running CRC32 calculation value which will be updated.

ReadOnlySpan<System.Byte> bytes

The new data segment to "append" to the CRC32 calculation.

| Improve this Doc View Source

Finalize(UInt32)

After adding all the data you have received, call this method to obtain the final CRC32 calculation result.

Declaration
public static uint Finalize(uint value)
Parameters
Type Name Description
System.UInt32 value

The running CRC32 calculation value.

Returns
Type Description
System.UInt32

The finalized CRC32 calculation result.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX