Table of Contents

Class OdfCrc32

Namespace
OdfKit.Core
Assembly
OdfKit.dll

Computes CRC-32 (ISO-HDLC) checksums with hardware acceleration when available. 在可用時使用硬體加速計算 CRC-32 (ISO-HDLC) 校驗碼。

public static class OdfCrc32
Inheritance
OdfCrc32
Inherited Members

Methods

Compute(ReadOnlySpan<byte>)

Computes the CRC-32 checksum for the specified bytes. 計算指定位元組的 CRC-32 校驗碼。

public static uint Compute(ReadOnlySpan<byte> bytes)

Parameters

bytes ReadOnlySpan<byte>

The bytes to process. / 要處理的位元組。

Returns

uint

The final CRC-32 checksum. / 最終 CRC-32 校驗碼。

Compute(uint, ReadOnlySpan<byte>)

Accumulates CRC-32 state with the specified bytes. 使用指定位元組累積 CRC-32 狀態。

public static uint Compute(uint currentCrc, ReadOnlySpan<byte> bytes)

Parameters

currentCrc uint

The previous CRC state, usually 0xFFFFFFFF. / 先前的 CRC 狀態,通常為 0xFFFFFFFF

bytes ReadOnlySpan<byte>

The bytes to process. / 要處理的位元組。

Returns

uint

The updated intermediate CRC state. / 更新後的 CRC 中間狀態。