Class Crc16

Namespace
CHDSharp.Utils
Assembly
CHDSharpLib.dll

A CCITT-style CRC-16 calculator used by the CHD format.

public static class Crc16
Inheritance
Crc16
Inherited Members

Methods

Compute(byte[], int, int)

Computes the CRC-16 checksum of a byte array segment.

public static ushort Compute(byte[] data, int offset, int length)

Parameters

data byte[]

The source byte array.

offset int

The starting offset within the array.

length int

The number of bytes to include.

Returns

ushort

The 16-bit CRC value.

Compute(ReadOnlySpan<byte>)

Computes the CRC-16 checksum of a byte span.

public static ushort Compute(ReadOnlySpan<byte> data)

Parameters

data ReadOnlySpan<byte>

The data to checksum.

Returns

ushort

The 16-bit CRC value.