C# 클래스 ImageTools.CRC32Calculator

파일 보기 프로젝트 열기: prepare/HTML-Renderer 1 사용 예제들

공개 메소드들

메소드 설명
CRC32Calculator ( ) : System
CalculateCrc32 ( byte buffer ) : int
CalculateCrc32 ( string inputData ) : int
Combine ( int crc, int length ) : void

Combines the given CRC32 value with the current running total.

This is useful when using a divide-and-conquer approach to calculating a CRC. Multiple threads can each calculate a CRC32 on a segment of the data, and then combine the individual CRC32 values at the end.

Reset ( ) : void

reset before reuse

SlurpBlock ( byte block ) : void
SlurpBlock ( byte block, int offset, int count ) : void

Update the value for the running CRC32 using the given block of bytes. This is useful when using the CRC32() class in a Stream.

비공개 메소드들

메소드 설명
ComputeCrc32 ( Int32 W, byte B ) : Int32

Get the CRC32 for the given (word,byte) combo. This is a computation defined by PKzip.

_InternalComputeCrc32 ( UInt32 W, byte B ) : Int32
gf2_matrix_square ( uint square, uint mat ) : void
gf2_matrix_times ( uint matrix, uint vec ) : uint

메소드 상세

CRC32Calculator() 공개 메소드

public CRC32Calculator ( ) : System
리턴 System

CalculateCrc32() 공개 정적인 메소드

public static CalculateCrc32 ( byte buffer ) : int
buffer byte
리턴 int

CalculateCrc32() 공개 정적인 메소드

public static CalculateCrc32 ( string inputData ) : int
inputData string
리턴 int

Combine() 공개 메소드

Combines the given CRC32 value with the current running total.
This is useful when using a divide-and-conquer approach to calculating a CRC. Multiple threads can each calculate a CRC32 on a segment of the data, and then combine the individual CRC32 values at the end.
public Combine ( int crc, int length ) : void
crc int the crc value to be combined with this one
length int the length of data the CRC value was calculated on
리턴 void

Reset() 공개 메소드

reset before reuse
public Reset ( ) : void
리턴 void

SlurpBlock() 공개 메소드

public SlurpBlock ( byte block ) : void
block byte
리턴 void

SlurpBlock() 공개 메소드

Update the value for the running CRC32 using the given block of bytes. This is useful when using the CRC32() class in a Stream.
public SlurpBlock ( byte block, int offset, int count ) : void
block byte block of bytes to slurp
offset int starting point in the block
count int how many bytes within the block to slurp
리턴 void