Class CRC32
- Namespace
- DuetControlServer.Utility
- Assembly
- DuetControlServer.dll
Functions for CRC32 calculation
public static class CRC32
- Inheritance
-
CRC32
- Inherited Members
Remarks
The internals of this class originate from Crc32.NET, see https://github.com/force-net/Crc32.NET
Methods
Calculate(Span<byte>)
Calculate the CRC32 checksum for the given byte span
public static uint Calculate(Span<byte> buffer)
Parameters
Returns
- uint
CRC32 checksum
CalculateAsync(Stream, int, CancellationToken)
Calculate the CRC32 checksum for the given stream
public static Task<uint> CalculateAsync(Stream stream, int bufferSize, CancellationToken cancellationToken = default)
Parameters
streamStreamInput stream
bufferSizeintBuffer size to use
cancellationTokenCancellationTokenOptional cancellation token