version 1.2, 2014/01/29 14:16:54
|
version 1.2.4.1, 2014/01/30 07:32:46
|
Line 110 static const uint32_t crc32_table[256] = {
|
Line 110 static const uint32_t crc32_table[256] = {
|
#define DO8(crc, buf) DO4(crc, buf); DO4(crc, buf); |
#define DO8(crc, buf) DO4(crc, buf); DO4(crc, buf); |
|
|
/* |
/* |
* crc32() - CRC32 calculation from table | * crc_32() - CRC32 calculation from table |
* |
* |
* @crc = Initial crc value |
* @crc = Initial crc value |
* @buf = Data for calculation |
* @buf = Data for calculation |
Line 118 static const uint32_t crc32_table[256] = {
|
Line 118 static const uint32_t crc32_table[256] = {
|
* return: calculated CRC32 |
* return: calculated CRC32 |
*/ |
*/ |
uint32_t |
uint32_t |
crc32(uint32_t crc, const uint8_t * __restrict buf, uint32_t len) | crc_32(uint32_t crc, const uint8_t * __restrict buf, uint32_t len) |
{ |
{ |
crc = crc ^ 0xffffffff; |
crc = crc ^ 0xffffffff; |
while (len >= 8) { |
while (len >= 8) { |