#include "zutil.h"
#include "crc32.h"
Go to the source code of this file.
|
local unsigned long
gf2_matrix_times | OF ((unsigned long *mat, unsigned long vec)) |
|
local void gf2_matrix_square | OF ((unsigned long *square, unsigned long *mat)) |
|
local uLong crc32_combine_ | OF ((uLong crc1, uLong crc2, z_off64_t len2)) |
|
const z_crc_t FAR *ZEXPORT | get_crc_table () |
|
unsigned long ZEXPORT | crc32 (unsigned long crc, const unsigned char FAR *buf, uInt len) |
|
local unsigned long | gf2_matrix_times (unsigned long *mat, unsigned long vec) |
|
local void | gf2_matrix_square (unsigned long *square, unsigned long *mat) |
|
local uLong | crc32_combine_ (uLong crc1, uLong crc2, z_off64_t len2) |
|
uLong ZEXPORT | crc32_combine (uLong crc1, uLong crc2, z_off_t len2) |
|
uLong ZEXPORT | crc32_combine64 (uLong crc1, uLong crc2, z_off64_t len2) |
|
#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8) |
#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */ |
unsigned long ZEXPORT crc32 |
( |
unsigned long |
crc, |
|
|
const unsigned char FAR * |
buf, |
|
|
uInt |
len |
|
) |
| |
Definition at line 202 of file crc32.cc.
204 if (buf ==
Z_NULL)
return 0UL;
206 #ifdef DYNAMIC_CRC_TABLE
212 if (
sizeof(
void *) ==
sizeof(ptrdiff_t)) {
216 if (*((
unsigned char *)(&endian)))
217 return crc32_little(crc, buf,
len);
219 return crc32_big(crc, buf,
len);
222 crc = crc ^ 0xffffffffUL;
230 return crc ^ 0xffffffffUL;
uLong ZEXPORT crc32_combine |
( |
uLong |
crc1, |
|
|
uLong |
crc2, |
|
|
z_off_t |
len2 |
|
) |
| |
Definition at line 393 of file crc32.cc.
local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2)
uLong ZEXPORT crc32_combine64 |
( |
uLong |
crc1, |
|
|
uLong |
crc2, |
|
|
z_off64_t |
len2 |
|
) |
| |
Definition at line 398 of file crc32.cc.
local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2)
local uLong crc32_combine_ |
( |
uLong |
crc1, |
|
|
uLong |
crc2, |
|
|
z_off64_t |
len2 |
|
) |
| |
Definition at line 340 of file crc32.cc.
352 odd[0] = 0xedb88320UL;
354 for (n = 1; n <
GF2_DIM; n++) {
local void gf2_matrix_square(unsigned long *square, unsigned long *mat)
local unsigned long gf2_matrix_times(unsigned long *mat, unsigned long vec)
const z_crc_t FAR* ZEXPORT get_crc_table |
( |
| ) |
|
Definition at line 188 of file crc32.cc.
190 #ifdef DYNAMIC_CRC_TABLE
local const z_crc_t FAR crc_table[TBLS][256]
local void gf2_matrix_square |
( |
unsigned long * |
square, |
|
|
unsigned long * |
mat |
|
) |
| |
Definition at line 331 of file crc32.cc.
local unsigned long gf2_matrix_times(unsigned long *mat, unsigned long vec)
local unsigned long gf2_matrix_times |
( |
unsigned long * |
mat, |
|
|
unsigned long |
vec |
|
) |
| |