Struct CRC32Builder
Use this struct to incrementally calculate the running CRC32 value of a stream of data as each new data segment becomes available.
Namespace: FFT.CRC
Assembly: FFT.CRC.dll
Syntax
public struct CRC32Builder
Remarks
This struct MUST BE INITIALIZED before use with the Initialize() method, or you can obtain an already-initialized value with the static InitializedValue property.
Properties
| Improve this Doc View SourceInitializedValue
Gets an initialized CRC32Builder.
Declaration
public static CRC32Builder InitializedValue { get; }
Property Value
| Type | Description |
|---|---|
| CRC32Builder |
Value
Gets a finalized CRC32 value for the data that has been added so far.
Declaration
public uint Value { get; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Methods
| Improve this Doc View SourceAdd(ReadOnlySpan<Byte>)
Updates Value with the new data. You may call this method as many times as you like until all the data has arrived.
Declaration
public void Add(ReadOnlySpan<byte> bytes)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<System.Byte> | bytes | The new data segment to "append" to the CRC32 calculation. |
Initialize()
Resets internal values ready to calculate a new CRC32 value from the beginning of a new stream of data. Always initialize a CRC32Builder with this method before use, or obtain an initial value via the static InitializedValue property.
Declaration
public void Initialize()