C# Класс RestSharp.Compression.ZLib.Crc32

Calculates a 32bit Cyclic Redundancy Checksum (CRC) using the same polynomial used by Zip. This type is used internally by DotNetZip; it is generally not used directly by applications wishing to create, read, or manipulate zip archive files.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ComputeCrc32 ( int w, byte b ) : int

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

GetCrc32 ( Stream input ) : int

Returns the CRC32 for the specified stream.

GetCrc32AndCopy ( Stream input, Stream output ) : int

Returns the CRC32 for the specified stream, and writes the input into the output stream.

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.

Приватные методы

Метод Описание
Crc32 ( ) : System
InternalComputeCrc32 ( uint w, byte b ) : int

Описание методов

ComputeCrc32() публичный Метод

Get the CRC32 for the given (word,byte) combo. This is a computation defined by PKzip.
public ComputeCrc32 ( int w, byte b ) : int
w int The word to start with.
b byte The byte to combine it with.
Результат int

GetCrc32() публичный Метод

Returns the CRC32 for the specified stream.
public GetCrc32 ( Stream input ) : int
input Stream The stream over which to calculate the CRC32
Результат int

GetCrc32AndCopy() публичный Метод

Returns the CRC32 for the specified stream, and writes the input into the output stream.
public GetCrc32AndCopy ( Stream input, Stream output ) : int
input Stream The stream over which to calculate the CRC32
output Stream The stream into which to deflate the input
Результат int

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