version 1.1.2.3, 2014/01/29 14:11:45
|
version 1.4, 2015/06/25 17:53:50
|
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 - 2015 |
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 | * 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) { |