![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cCRC.h>
Public Member Functions | |
cCRC32Table () | |
~cCRC32Table () | |
void | BuildTable (CRC32_t nPoly=k_nPolynomial) |
CRC32_t | CalculateBufferCRC (const void *pInput, size_t nInputSize, CRC32_t nCrc=k_nStart) const |
UNITTEST_FRIEND (cCRC) | |
Public Attributes | |
cArrayVal< CRC32_t > | m_CRCTable |
working CRC lookup table. [ 256 ] More... | |
Static Public Attributes | |
static const cCRC32Table | k_Def |
default instance. More... | |
static const CRC32_t | k_nStart = 0xFFFFFFFFUL |
Default starting value for CRC. More... | |
static const CRC32_t | k_nPolynomial = 0xEDB88320UL |
Default polynomial used for ZIP files. More... | |
Singleton table to create 32 bit CRC's the same as ZIP files.
GrayLib::cCRC32Table::cCRC32Table | ( | ) |
GrayLib::cCRC32Table::~cCRC32Table | ( | ) |
void GrayLib::cCRC32Table::BuildTable | ( | CRC32_t | nPoly = k_nPolynomial | ) |
build my CRC32 lookup table based on a starting polynomial. nPoly = cCRC32Table::k_nPolynomial
CRC32_t GrayLib::cCRC32Table::CalculateBufferCRC | ( | const void * | pInput, |
size_t | nInputSize, | ||
CRC32_t | nCrc = k_nStart |
||
) | const |
calculates the CRC for a block of data using the table lookup method.
GrayLib::cCRC32Table::UNITTEST_FRIEND | ( | cCRC | ) |
|
static |
default instance.
|
static |
Default polynomial used for ZIP files.
|
static |
Default starting value for CRC.