My Project
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Properties | List of all members
UniExtensions.Zlib.CRC32 Class Reference

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. More...

Public Member Functions

Int32 GetCrc32 (System.IO.Stream input)
 Returns the CRC32 for the specified stream. More...
 
Int32 GetCrc32AndCopy (System.IO.Stream input, System.IO.Stream output)
 Returns the CRC32 for the specified stream, and writes the input into the output stream. More...
 
Int32 ComputeCrc32 (Int32 W, byte B)
 Get the CRC32 for the given (word,byte) combo. This is a computation defined by PKzip. More...
 
void SlurpBlock (byte[] block, int offset, int count)
 Update the value for the running CRC32 using the given block of bytes. This is useful when using the CRC32() class in a Stream. More...
 

Properties

Int64 TotalBytesRead [get]
 indicates the total number of bytes read on the CRC stream. This is used when writing the ZipDirEntry when compressing files. More...
 
Int32 Crc32Result [get]
 Indicates the current CRC for all blocks slurped in. More...
 

Detailed Description

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.

Member Function Documentation

Int32 UniExtensions.Zlib.CRC32.ComputeCrc32 ( Int32  W,
byte  B 
)
inline

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

Parameters
WThe word to start with.
BThe byte to combine it with.
Returns
The CRC-ized result.
Int32 UniExtensions.Zlib.CRC32.GetCrc32 ( System.IO.Stream  input)
inline

Returns the CRC32 for the specified stream.

Parameters
inputThe stream over which to calculate the CRC32
Returns
the CRC32 calculation
Int32 UniExtensions.Zlib.CRC32.GetCrc32AndCopy ( System.IO.Stream  input,
System.IO.Stream  output 
)
inline

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

Parameters
inputThe stream over which to calculate the CRC32
outputThe stream into which to deflate the input
Returns
the CRC32 calculation
void UniExtensions.Zlib.CRC32.SlurpBlock ( byte[]  block,
int  offset,
int  count 
)
inline

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

Parameters
blockblock of bytes to slurp
offsetstarting point in the block
counthow many bytes within the block to slurp

Property Documentation

Int32 UniExtensions.Zlib.CRC32.Crc32Result
get

Indicates the current CRC for all blocks slurped in.

Int64 UniExtensions.Zlib.CRC32.TotalBytesRead
get

indicates the total number of bytes read on the CRC stream. This is used when writing the ZipDirEntry when compressing files.


The documentation for this class was generated from the following file: