#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "misc/util/abc_global.h"
#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_ (uLong crc1, uLong crc2, z_off64_t len2) |
|
ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START const
unsigned long 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) |
|
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) */ |
Definition at line 230 of file crc32.c.
232 if (buf ==
Z_NULL)
return 0UL;
234 #ifdef DYNAMIC_CRC_TABLE
240 if (
sizeof(
void *) ==
sizeof(ptrdiff_t)) {
244 if (*((
unsigned char *)(&endian)))
245 return crc32_little(crc, buf, len);
247 return crc32_big(crc, buf, len);
250 crc = crc ^ 0xffffffffUL;
258 return crc ^ 0xffffffffUL;
Definition at line 421 of file crc32.c.
local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2)
Definition at line 426 of file crc32.c.
local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2)
Definition at line 368 of file crc32.c.
380 odd[0] = 0xedb88320UL;
382 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)
Definition at line 216 of file crc32.c.
218 #ifdef DYNAMIC_CRC_TABLE
ABC_NAMESPACE_HEADER_START local const unsigned long FAR crc_table[TBLS][256]
local void gf2_matrix_square |
( |
unsigned long * |
square, |
|
|
unsigned long * |
mat |
|
) |
| |
Definition at line 359 of file crc32.c.
local unsigned long gf2_matrix_times(unsigned long *mat, unsigned long vec)
local unsigned long gf2_matrix_times |
( |
unsigned long * |
mat, |
|
|
unsigned long |
vec |
|
) |
| |