#include "zlib.h"
Go to the source code of this file.
Defines | |
| #define | DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8); |
| #define | DO2(buf) DO1(buf); DO1(buf); |
| #define | DO4(buf) DO2(buf); DO2(buf); |
| #define | DO8(buf) DO4(buf); DO4(buf); |
| #define | local static |
Functions | |
| uLong ZEXPORT | crc32 (uLong crc, const Bytef *buf, uInt len) |
| const uLongf *ZEXPORT | get_crc_table () |
Variables | |
| local const uLongf | crc_table [256] |
Definition at line 142 of file crc32.c.
00146 { 00147 if (buf == Z_NULL) return 0L; 00148 #ifdef DYNAMIC_CRC_TABLE 00149 if (crc_table_empty) 00150 make_crc_table(); 00151 #endif 00152 crc = crc ^ 0xffffffffL; 00153 while (len >= 8) 00154 { 00155 DO8(buf); 00156 len -= 8; 00157 } 00158 if (len) do { 00159 DO1(buf); 00160 } while (--len); 00161 return crc ^ 0xffffffffL; 00162 }
| const uLongf* ZEXPORT get_crc_table | ( | ) |
1.6.1