version 1.2, 2014/01/29 14:16:54
|
version 1.4.84.1, 2024/10/10 23:53:00
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004 - 2014 | Copyright 2004 - 2024 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
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 | * crc32tbl() - 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) | crc32tbl(uint32_t crc, const uint8_t * __restrict buf, uint32_t len) |
{ |
{ |
crc = crc ^ 0xffffffff; |
crc = crc ^ 0xffffffff; |
while (len >= 8) { |
while (len >= 8) { |