Table of Contents

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

buffer Span<byte>

Input data

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

stream Stream

Input stream

bufferSize int

Buffer size to use

cancellationToken CancellationToken

Optional cancellation token

Returns

Task<uint>