Go to the source code of this file.
|
#define | INIT_TRADITIONAL_CRC32(crc) ((crc) = 0xFFFFFFFF) |
|
#define | FIN_TRADITIONAL_CRC32(crc) ((crc) ^= 0xFFFFFFFF) |
|
#define | COMP_TRADITIONAL_CRC32(crc, data, len) COMP_CRC32_NORMAL_TABLE(crc, data, len, pg_crc32_table) |
|
#define | EQ_TRADITIONAL_CRC32(c1, c2) ((c1) == (c2)) |
|
#define | COMP_CRC32_NORMAL_TABLE(crc, data, len, table) |
|
#define | INIT_LEGACY_CRC32(crc) ((crc) = 0xFFFFFFFF) |
|
#define | FIN_LEGACY_CRC32(crc) ((crc) ^= 0xFFFFFFFF) |
|
#define | COMP_LEGACY_CRC32(crc, data, len) COMP_CRC32_REFLECTED_TABLE(crc, data, len, pg_crc32_table) |
|
#define | EQ_LEGACY_CRC32(c1, c2) ((c1) == (c2)) |
|
#define | COMP_CRC32_REFLECTED_TABLE(crc, data, len, table) |
|
◆ COMP_CRC32_NORMAL_TABLE
#define COMP_CRC32_NORMAL_TABLE |
( |
|
crc, |
|
|
|
data, |
|
|
|
len, |
|
|
|
table |
|
) |
| |
Value:do { \
const
unsigned char *__data = (
const unsigned char *) (
data); \
{ \
int __tab_index = ((int) (
crc) ^ *__data++) & 0xFF; \
(
crc) = table[__tab_index] ^ ((
crc) >> 8); \
} \
} while (0)
Definition at line 53 of file pg_crc.h.
◆ COMP_CRC32_REFLECTED_TABLE
#define COMP_CRC32_REFLECTED_TABLE |
( |
|
crc, |
|
|
|
data, |
|
|
|
len, |
|
|
|
table |
|
) |
| |
Value:do { \
const
unsigned char *__data = (
const unsigned char *) (
data); \
{ \
int __tab_index = ((int) ((
crc) >> 24) ^ *__data++) & 0xFF; \
(
crc) = table[__tab_index] ^ ((
crc) << 8); \
} \
} while (0)
Definition at line 89 of file pg_crc.h.
◆ COMP_LEGACY_CRC32
◆ COMP_TRADITIONAL_CRC32
◆ EQ_LEGACY_CRC32
#define EQ_LEGACY_CRC32 |
( |
|
c1, |
|
|
|
c2 |
|
) |
| ((c1) == (c2)) |
◆ EQ_TRADITIONAL_CRC32
#define EQ_TRADITIONAL_CRC32 |
( |
|
c1, |
|
|
|
c2 |
|
) |
| ((c1) == (c2)) |
◆ FIN_LEGACY_CRC32
#define FIN_LEGACY_CRC32 |
( |
|
crc | ) |
((crc) ^= 0xFFFFFFFF) |
◆ FIN_TRADITIONAL_CRC32
#define FIN_TRADITIONAL_CRC32 |
( |
|
crc | ) |
((crc) ^= 0xFFFFFFFF) |
◆ INIT_LEGACY_CRC32
#define INIT_LEGACY_CRC32 |
( |
|
crc | ) |
((crc) = 0xFFFFFFFF) |
◆ INIT_TRADITIONAL_CRC32
#define INIT_TRADITIONAL_CRC32 |
( |
|
crc | ) |
((crc) = 0xFFFFFFFF) |
◆ pg_crc32
◆ pg_crc32_table