From 671e67b62d859950f86e6eec04e16b72404f3bf9 Mon Sep 17 00:00:00 2001 From: Marcel Cornu Date: Fri, 19 Apr 2024 17:08:33 +0100 Subject: [PATCH] crc: reformat using new code style Signed-off-by: Marcel Cornu --- crc/aarch64/crc64_rocksoft.c | 10 +- crc/aarch64/crc_aarch64_dispatcher.c | 199 ++-- crc/crc16_t10dif_copy_perf.c | 58 +- crc/crc16_t10dif_copy_test.c | 224 ++-- crc/crc16_t10dif_op_perf.c | 103 +- crc/crc16_t10dif_perf.c | 49 +- crc/crc16_t10dif_test.c | 231 ++-- crc/crc32_funcs_test.c | 415 +++---- crc/crc32_gzip_refl_perf.c | 64 +- crc/crc32_ieee_perf.c | 49 +- crc/crc32_iscsi_perf.c | 49 +- crc/crc64_base.c | 1656 +++++++++----------------- crc/crc64_example.c | 55 +- crc/crc64_funcs_perf.c | 85 +- crc/crc64_funcs_test.c | 418 +++---- crc/crc64_ref.h | 189 +-- crc/crc_base.c | 446 +++---- crc/crc_base_aliases.c | 65 +- crc/crc_ref.h | 127 +- crc/crc_simple_test.c | 37 +- 20 files changed, 1995 insertions(+), 2534 deletions(-) diff --git a/crc/aarch64/crc64_rocksoft.c b/crc/aarch64/crc64_rocksoft.c index 1058498..47669e7 100644 --- a/crc/aarch64/crc64_rocksoft.c +++ b/crc/aarch64/crc64_rocksoft.c @@ -30,12 +30,14 @@ #include "crc64.h" #include -uint64_t crc64_rocksoft_refl(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_rocksoft_refl(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_rocksoft_refl_base(seed, buf, len); + return crc64_rocksoft_refl_base(seed, buf, len); } -uint64_t crc64_rocksoft_norm(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_rocksoft_norm(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_rocksoft_norm_base(seed, buf, len); + return crc64_rocksoft_norm_base(seed, buf, len); } diff --git a/crc/aarch64/crc_aarch64_dispatcher.c b/crc/aarch64/crc_aarch64_dispatcher.c index fe3bb46..2e07760 100644 --- a/crc/aarch64/crc_aarch64_dispatcher.c +++ b/crc/aarch64/crc_aarch64_dispatcher.c @@ -31,185 +31,174 @@ DEFINE_INTERFACE_DISPATCHER(crc16_t10dif) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_PMULL) - return PROVIDER_INFO(crc16_t10dif_pmull); + unsigned long auxval = getauxval(AT_HWCAP); + if (auxval & HWCAP_PMULL) + return PROVIDER_INFO(crc16_t10dif_pmull); #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc16_t10dif_pmull); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc16_t10dif_pmull); #endif - return PROVIDER_BASIC(crc16_t10dif); - + return PROVIDER_BASIC(crc16_t10dif); } DEFINE_INTERFACE_DISPATCHER(crc16_t10dif_copy) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_PMULL) - return PROVIDER_INFO(crc16_t10dif_copy_pmull); + unsigned long auxval = getauxval(AT_HWCAP); + if (auxval & HWCAP_PMULL) + return PROVIDER_INFO(crc16_t10dif_copy_pmull); #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc16_t10dif_copy_pmull); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc16_t10dif_copy_pmull); #endif - return PROVIDER_BASIC(crc16_t10dif_copy); - + return PROVIDER_BASIC(crc16_t10dif_copy); } DEFINE_INTERFACE_DISPATCHER(crc32_ieee) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_PMULL) { - return PROVIDER_INFO(crc32_ieee_norm_pmull); - } + unsigned long auxval = getauxval(AT_HWCAP); + if (auxval & HWCAP_PMULL) { + return PROVIDER_INFO(crc32_ieee_norm_pmull); + } #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc32_ieee_norm_pmull); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc32_ieee_norm_pmull); #endif - return PROVIDER_BASIC(crc32_ieee); - + return PROVIDER_BASIC(crc32_ieee); } DEFINE_INTERFACE_DISPATCHER(crc32_iscsi) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_CRC32) { - switch (get_micro_arch_id()) { - case MICRO_ARCH_ID(ARM, NEOVERSE_N1): - case MICRO_ARCH_ID(ARM, CORTEX_A57): - case MICRO_ARCH_ID(ARM, CORTEX_A72): - return PROVIDER_INFO(crc32_iscsi_crc_ext); - } - } - if ((HWCAP_CRC32 | HWCAP_PMULL) == (auxval & (HWCAP_CRC32 | HWCAP_PMULL))) { - return PROVIDER_INFO(crc32_iscsi_3crc_fold); - } + unsigned long auxval = getauxval(AT_HWCAP); + if (auxval & HWCAP_CRC32) { + switch (get_micro_arch_id()) { + case MICRO_ARCH_ID(ARM, NEOVERSE_N1): + case MICRO_ARCH_ID(ARM, CORTEX_A57): + case MICRO_ARCH_ID(ARM, CORTEX_A72): + return PROVIDER_INFO(crc32_iscsi_crc_ext); + } + } + if ((HWCAP_CRC32 | HWCAP_PMULL) == (auxval & (HWCAP_CRC32 | HWCAP_PMULL))) { + return PROVIDER_INFO(crc32_iscsi_3crc_fold); + } - if (auxval & HWCAP_PMULL) { - return PROVIDER_INFO(crc32_iscsi_refl_pmull); - } + if (auxval & HWCAP_PMULL) { + return PROVIDER_INFO(crc32_iscsi_refl_pmull); + } #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_CRC32_KEY)) - return PROVIDER_INFO(crc32_iscsi_3crc_fold); - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc32_iscsi_refl_pmull); + if (sysctlEnabled(SYSCTL_CRC32_KEY)) + return PROVIDER_INFO(crc32_iscsi_3crc_fold); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc32_iscsi_refl_pmull); #endif - return PROVIDER_BASIC(crc32_iscsi); - + return PROVIDER_BASIC(crc32_iscsi); } DEFINE_INTERFACE_DISPATCHER(crc32_gzip_refl) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); + unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_CRC32) { - switch (get_micro_arch_id()) { - case MICRO_ARCH_ID(ARM, NEOVERSE_N1): - case MICRO_ARCH_ID(ARM, CORTEX_A57): - case MICRO_ARCH_ID(ARM, CORTEX_A72): - return PROVIDER_INFO(crc32_gzip_refl_crc_ext); - } - } - if ((HWCAP_CRC32 | HWCAP_PMULL) == (auxval & (HWCAP_CRC32 | HWCAP_PMULL))) { - return PROVIDER_INFO(crc32_gzip_refl_3crc_fold); - } + if (auxval & HWCAP_CRC32) { + switch (get_micro_arch_id()) { + case MICRO_ARCH_ID(ARM, NEOVERSE_N1): + case MICRO_ARCH_ID(ARM, CORTEX_A57): + case MICRO_ARCH_ID(ARM, CORTEX_A72): + return PROVIDER_INFO(crc32_gzip_refl_crc_ext); + } + } + if ((HWCAP_CRC32 | HWCAP_PMULL) == (auxval & (HWCAP_CRC32 | HWCAP_PMULL))) { + return PROVIDER_INFO(crc32_gzip_refl_3crc_fold); + } - if (auxval & HWCAP_PMULL) - return PROVIDER_INFO(crc32_gzip_refl_pmull); + if (auxval & HWCAP_PMULL) + return PROVIDER_INFO(crc32_gzip_refl_pmull); #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_CRC32_KEY)) - return PROVIDER_INFO(crc32_gzip_refl_3crc_fold); - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc32_gzip_refl_pmull); + if (sysctlEnabled(SYSCTL_CRC32_KEY)) + return PROVIDER_INFO(crc32_gzip_refl_3crc_fold); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc32_gzip_refl_pmull); #endif - return PROVIDER_BASIC(crc32_gzip_refl); - + return PROVIDER_BASIC(crc32_gzip_refl); } DEFINE_INTERFACE_DISPATCHER(crc64_ecma_refl) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); + unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_PMULL) - return PROVIDER_INFO(crc64_ecma_refl_pmull); + if (auxval & HWCAP_PMULL) + return PROVIDER_INFO(crc64_ecma_refl_pmull); #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc64_ecma_refl_pmull); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc64_ecma_refl_pmull); #endif - return PROVIDER_BASIC(crc64_ecma_refl); - + return PROVIDER_BASIC(crc64_ecma_refl); } DEFINE_INTERFACE_DISPATCHER(crc64_ecma_norm) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_PMULL) - return PROVIDER_INFO(crc64_ecma_norm_pmull); + unsigned long auxval = getauxval(AT_HWCAP); + if (auxval & HWCAP_PMULL) + return PROVIDER_INFO(crc64_ecma_norm_pmull); #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc64_ecma_norm_pmull); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc64_ecma_norm_pmull); #endif - return PROVIDER_BASIC(crc64_ecma_norm); - + return PROVIDER_BASIC(crc64_ecma_norm); } DEFINE_INTERFACE_DISPATCHER(crc64_iso_refl) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_PMULL) - return PROVIDER_INFO(crc64_iso_refl_pmull); + unsigned long auxval = getauxval(AT_HWCAP); + if (auxval & HWCAP_PMULL) + return PROVIDER_INFO(crc64_iso_refl_pmull); #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc64_iso_refl_pmull); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc64_iso_refl_pmull); #endif - return PROVIDER_BASIC(crc64_iso_refl); - + return PROVIDER_BASIC(crc64_iso_refl); } DEFINE_INTERFACE_DISPATCHER(crc64_iso_norm) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_PMULL) - return PROVIDER_INFO(crc64_iso_norm_pmull); + unsigned long auxval = getauxval(AT_HWCAP); + if (auxval & HWCAP_PMULL) + return PROVIDER_INFO(crc64_iso_norm_pmull); #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc64_iso_norm_pmull); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc64_iso_norm_pmull); #endif - return PROVIDER_BASIC(crc64_iso_norm); - + return PROVIDER_BASIC(crc64_iso_norm); } DEFINE_INTERFACE_DISPATCHER(crc64_jones_refl) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_PMULL) - return PROVIDER_INFO(crc64_jones_refl_pmull); + unsigned long auxval = getauxval(AT_HWCAP); + if (auxval & HWCAP_PMULL) + return PROVIDER_INFO(crc64_jones_refl_pmull); #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc64_jones_refl_pmull); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc64_jones_refl_pmull); #endif - return PROVIDER_BASIC(crc64_jones_refl); - + return PROVIDER_BASIC(crc64_jones_refl); } DEFINE_INTERFACE_DISPATCHER(crc64_jones_norm) { #if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - if (auxval & HWCAP_PMULL) - return PROVIDER_INFO(crc64_jones_norm_pmull); + unsigned long auxval = getauxval(AT_HWCAP); + if (auxval & HWCAP_PMULL) + return PROVIDER_INFO(crc64_jones_norm_pmull); #elif defined(__APPLE__) - if (sysctlEnabled(SYSCTL_PMULL_KEY)) - return PROVIDER_INFO(crc64_jones_norm_pmull); + if (sysctlEnabled(SYSCTL_PMULL_KEY)) + return PROVIDER_INFO(crc64_jones_norm_pmull); #endif - return PROVIDER_BASIC(crc64_jones_norm); - + return PROVIDER_BASIC(crc64_jones_norm); } diff --git a/crc/crc16_t10dif_copy_perf.c b/crc/crc16_t10dif_copy_perf.c index 3985607..689f9f9 100644 --- a/crc/crc16_t10dif_copy_perf.c +++ b/crc/crc16_t10dif_copy_perf.c @@ -35,51 +35,51 @@ #include "test.h" #ifndef GT_L3_CACHE -# define GT_L3_CACHE 32*1024*1024 /* some number > last level cache */ +#define GT_L3_CACHE 32 * 1024 * 1024 /* some number > last level cache */ #endif #if !defined(COLD_TEST) && !defined(TEST_CUSTOM) // Cached test, loop many times over small dataset -# define TEST_LEN 8*1024 -# define TEST_TYPE_STR "_warm" -#elif defined (COLD_TEST) +#define TEST_LEN 8 * 1024 +#define TEST_TYPE_STR "_warm" +#elif defined(COLD_TEST) // Uncached test. Pull from large mem base. -# define TEST_LEN (2 * GT_L3_CACHE) -# define TEST_TYPE_STR "_cold" +#define TEST_LEN (2 * GT_L3_CACHE) +#define TEST_TYPE_STR "_cold" #endif #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif #define TEST_MEM TEST_LEN -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - void *src, *dst; - uint16_t crc; - struct perf start; + void *src, *dst; + uint16_t crc; + struct perf start; - printf("crc16_t10dif_copy_perf:\n"); + printf("crc16_t10dif_copy_perf:\n"); - if (posix_memalign(&src, 1024, TEST_LEN)) { - printf("alloc error: Fail"); - return -1; - } - if (posix_memalign(&dst, 1024, TEST_LEN)) { - printf("alloc error: Fail"); - return -1; - } + if (posix_memalign(&src, 1024, TEST_LEN)) { + printf("alloc error: Fail"); + return -1; + } + if (posix_memalign(&dst, 1024, TEST_LEN)) { + printf("alloc error: Fail"); + return -1; + } - printf("Start timed tests\n"); - fflush(0); + printf("Start timed tests\n"); + fflush(0); - memset(src, 0, TEST_LEN); - BENCHMARK(&start, BENCHMARK_TIME, crc = - crc16_t10dif_copy(TEST_SEED, dst, src, TEST_LEN)); - printf("crc16_t10dif_copy" TEST_TYPE_STR ": "); - perf_print(start, (long long)TEST_LEN); + memset(src, 0, TEST_LEN); + BENCHMARK(&start, BENCHMARK_TIME, crc = crc16_t10dif_copy(TEST_SEED, dst, src, TEST_LEN)); + printf("crc16_t10dif_copy" TEST_TYPE_STR ": "); + perf_print(start, (long long) TEST_LEN); - printf("finish 0x%x\n", crc); - return 0; + printf("finish 0x%x\n", crc); + return 0; } diff --git a/crc/crc16_t10dif_copy_test.c b/crc/crc16_t10dif_copy_test.c index ae791e1..8e33ee7 100644 --- a/crc/crc16_t10dif_copy_test.c +++ b/crc/crc16_t10dif_copy_test.c @@ -37,157 +37,161 @@ #include "test.h" #ifndef RANDOMS -# define RANDOMS 20 +#define RANDOMS 20 #endif #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif -#define MAX_BUF 2345 -#define TEST_SIZE 217 +#define MAX_BUF 2345 +#define TEST_SIZE 217 #define TEST_LEN (8 * 1024) typedef uint16_t u16; typedef uint8_t u8; // bitwise crc version -uint16_t crc16_t10dif_copy_ref(uint16_t seed, uint8_t * dst, uint8_t * src, uint64_t len); +uint16_t +crc16_t10dif_copy_ref(uint16_t seed, uint8_t *dst, uint8_t *src, uint64_t len); -void rand_buffer(unsigned char *buf, long buffer_size) +void +rand_buffer(unsigned char *buf, long buffer_size) { - long i; - for (i = 0; i < buffer_size; i++) - buf[i] = rand(); + long i; + for (i = 0; i < buffer_size; i++) + buf[i] = rand(); } -int memtst(unsigned char *buf, unsigned char c, int len) +int +memtst(unsigned char *buf, unsigned char c, int len) { - int i; - for (i = 0; i < len; i++) - if (*buf++ != c) - return 1; + int i; + for (i = 0; i < len; i++) + if (*buf++ != c) + return 1; - return 0; + return 0; } -int crc_copy_check(const char *description, u8 * dst, u8 * src, u8 dst_fill_val, int len, - int tot) +int +crc_copy_check(const char *description, u8 *dst, u8 *src, u8 dst_fill_val, int len, int tot) { - u16 seed; - int rem; + u16 seed; + int rem; - assert(tot >= len); - seed = rand(); - rem = tot - len; - memset(dst, dst_fill_val, tot); + assert(tot >= len); + seed = rand(); + rem = tot - len; + memset(dst, dst_fill_val, tot); - // multi-binary crc version - u16 crc_dut = crc16_t10dif_copy(seed, dst, src, len); - u16 crc_ref = crc16_t10dif(seed, src, len); - if (crc_dut != crc_ref) { - printf("%s, crc gen fail: 0x%4x 0x%4x len=%d\n", description, crc_dut, - crc_ref, len); - return 1; - } else if (memcmp(dst, src, len)) { - printf("%s, copy fail: len=%d\n", description, len); - return 1; - } else if (memtst(&dst[len], dst_fill_val, rem)) { - printf("%s, writeover fail: len=%d\n", description, len); - return 1; - } - // bitwise crc version - crc_dut = crc16_t10dif_copy_ref(seed, dst, src, len); - crc_ref = crc16_t10dif_ref(seed, src, len); - if (crc_dut != crc_ref) { - printf("%s, crc gen fail (table-driven): 0x%4x 0x%4x len=%d\n", description, - crc_dut, crc_ref, len); - return 1; - } else if (memcmp(dst, src, len)) { - printf("%s, copy fail (table driven): len=%d\n", description, len); - return 1; - } else if (memtst(&dst[len], dst_fill_val, rem)) { - printf("%s, writeover fail (table driven): len=%d\n", description, len); - return 1; - } - return 0; + // multi-binary crc version + u16 crc_dut = crc16_t10dif_copy(seed, dst, src, len); + u16 crc_ref = crc16_t10dif(seed, src, len); + if (crc_dut != crc_ref) { + printf("%s, crc gen fail: 0x%4x 0x%4x len=%d\n", description, crc_dut, crc_ref, + len); + return 1; + } else if (memcmp(dst, src, len)) { + printf("%s, copy fail: len=%d\n", description, len); + return 1; + } else if (memtst(&dst[len], dst_fill_val, rem)) { + printf("%s, writeover fail: len=%d\n", description, len); + return 1; + } + // bitwise crc version + crc_dut = crc16_t10dif_copy_ref(seed, dst, src, len); + crc_ref = crc16_t10dif_ref(seed, src, len); + if (crc_dut != crc_ref) { + printf("%s, crc gen fail (table-driven): 0x%4x 0x%4x len=%d\n", description, + crc_dut, crc_ref, len); + return 1; + } else if (memcmp(dst, src, len)) { + printf("%s, copy fail (table driven): len=%d\n", description, len); + return 1; + } else if (memtst(&dst[len], dst_fill_val, rem)) { + printf("%s, writeover fail (table driven): len=%d\n", description, len); + return 1; + } + return 0; } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - int r = 0; - int i; - int len, tot; - u8 *src_raw = NULL, *dst_raw = NULL; - u8 *src, *dst; + int r = 0; + int i; + int len, tot; + u8 *src_raw = NULL, *dst_raw = NULL; + u8 *src, *dst; - printf("Test crc16_t10dif_copy_test:\n"); - src_raw = (u8 *) malloc(TEST_LEN); - if (NULL == src_raw) { - printf("alloc error: Fail"); - return -1; - } - dst_raw = (u8 *) malloc(TEST_LEN); - if (NULL == dst_raw) { - printf("alloc error: Fail"); - aligned_free(src_raw); - return -1; - } - src = src_raw; - dst = dst_raw; + printf("Test crc16_t10dif_copy_test:\n"); + src_raw = (u8 *) malloc(TEST_LEN); + if (NULL == src_raw) { + printf("alloc error: Fail"); + return -1; + } + dst_raw = (u8 *) malloc(TEST_LEN); + if (NULL == dst_raw) { + printf("alloc error: Fail"); + aligned_free(src_raw); + return -1; + } + src = src_raw; + dst = dst_raw; - srand(TEST_SEED); + srand(TEST_SEED); - // Test of all zeros - memset(src, 0, TEST_LEN); - r |= crc_copy_check("zero tst", dst, src, 0x5e, MAX_BUF, TEST_LEN); + // Test of all zeros + memset(src, 0, TEST_LEN); + r |= crc_copy_check("zero tst", dst, src, 0x5e, MAX_BUF, TEST_LEN); - // Another simple test pattern - memset(src, 0xff, TEST_LEN); - r |= crc_copy_check("simp tst", dst, src, 0x5e, MAX_BUF, TEST_LEN); + // Another simple test pattern + memset(src, 0xff, TEST_LEN); + r |= crc_copy_check("simp tst", dst, src, 0x5e, MAX_BUF, TEST_LEN); - // Do a few short len random data tests - rand_buffer(src, TEST_LEN); - rand_buffer(dst, TEST_LEN); - for (i = 0; i < MAX_BUF; i++) { - r |= crc_copy_check("short len", dst, src, rand(), i, MAX_BUF); - } + // Do a few short len random data tests + rand_buffer(src, TEST_LEN); + rand_buffer(dst, TEST_LEN); + for (i = 0; i < MAX_BUF; i++) { + r |= crc_copy_check("short len", dst, src, rand(), i, MAX_BUF); + } #ifdef TEST_VERBOSE - printf("."); + printf("."); #endif - // Do a few longer tests, random data - for (i = TEST_LEN; i >= (TEST_LEN - TEST_SIZE); i--) { - r |= crc_copy_check("long len", dst, src, rand(), i, TEST_LEN); - } + // Do a few longer tests, random data + for (i = TEST_LEN; i >= (TEST_LEN - TEST_SIZE); i--) { + r |= crc_copy_check("long len", dst, src, rand(), i, TEST_LEN); + } #ifdef TEST_VERBOSE - printf("."); + printf("."); #endif - // Do random size, random data - for (i = 0; i < RANDOMS; i++) { - len = rand() % TEST_LEN; - r |= crc_copy_check("rand len", dst, src, rand(), len, TEST_LEN); - } + // Do random size, random data + for (i = 0; i < RANDOMS; i++) { + len = rand() % TEST_LEN; + r |= crc_copy_check("rand len", dst, src, rand(), len, TEST_LEN); + } #ifdef TEST_VERBOSE - printf("."); + printf("."); #endif - // Run tests at end of buffer - for (i = 0; i < RANDOMS; i++) { - len = rand() % TEST_LEN; - src = &src_raw[TEST_LEN - len - 1]; - dst = &dst_raw[TEST_LEN - len - 1]; - tot = len; - r |= crc_copy_check("end of buffer", dst, src, rand(), len, tot); - } + // Run tests at end of buffer + for (i = 0; i < RANDOMS; i++) { + len = rand() % TEST_LEN; + src = &src_raw[TEST_LEN - len - 1]; + dst = &dst_raw[TEST_LEN - len - 1]; + tot = len; + r |= crc_copy_check("end of buffer", dst, src, rand(), len, tot); + } #ifdef TEST_VERBOSE - printf("."); + printf("."); #endif - printf("Test done: %s\n", r ? "Fail" : "Pass"); + printf("Test done: %s\n", r ? "Fail" : "Pass"); - free(src_raw); - free(dst_raw); + free(src_raw); + free(dst_raw); - return r; + return r; } diff --git a/crc/crc16_t10dif_op_perf.c b/crc/crc16_t10dif_op_perf.c index 7dd7c72..353ab69 100644 --- a/crc/crc16_t10dif_op_perf.c +++ b/crc/crc16_t10dif_op_perf.c @@ -37,83 +37,82 @@ #define BLKSIZE (512) #ifndef GT_L3_CACHE -# define GT_L3_CACHE 32*1024*1024 /* some number > last level cache */ +#define GT_L3_CACHE 32 * 1024 * 1024 /* some number > last level cache */ #endif #if !defined(COLD_TEST) && !defined(TEST_CUSTOM) // Cached test, loop many times over small dataset -# define NBLOCKS 100 -# define TEST_TYPE_STR "_warm" -#elif defined (COLD_TEST) +#define NBLOCKS 100 +#define TEST_TYPE_STR "_warm" +#elif defined(COLD_TEST) // Uncached test. Pull from large mem base. -# define TEST_LEN (2 * GT_L3_CACHE) -# define NBLOCKS (TEST_LEN / BLKSIZE) -# define TEST_TYPE_STR "_cold" +#define TEST_LEN (2 * GT_L3_CACHE) +#define NBLOCKS (TEST_LEN / BLKSIZE) +#define TEST_TYPE_STR "_cold" #endif #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif struct blk { - uint8_t data[BLKSIZE]; + uint8_t data[BLKSIZE]; }; struct blk_ext { - uint8_t data[BLKSIZE]; - uint32_t tag; - uint16_t meta; - uint16_t crc; + uint8_t data[BLKSIZE]; + uint32_t tag; + uint16_t meta; + uint16_t crc; }; -static void crc16_t10dif_copy_perf(struct blk *blks, struct blk *blkp, - struct blk_ext *blks_ext, struct blk_ext *blkp_ext, - uint16_t * crc) +static void +crc16_t10dif_copy_perf(struct blk *blks, struct blk *blkp, struct blk_ext *blks_ext, + struct blk_ext *blkp_ext, uint16_t *crc) { - int i; - for (i = 0, blkp = blks, blkp_ext = blks_ext; i < NBLOCKS; i++) { - *crc = crc16_t10dif_copy(TEST_SEED, blkp_ext->data, blkp->data, - sizeof(blks->data)); - blkp_ext->crc = *crc; - blkp++; - blkp_ext++; - } + int i; + for (i = 0, blkp = blks, blkp_ext = blks_ext; i < NBLOCKS; i++) { + *crc = crc16_t10dif_copy(TEST_SEED, blkp_ext->data, blkp->data, sizeof(blks->data)); + blkp_ext->crc = *crc; + blkp++; + blkp_ext++; + } } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - uint16_t crc; - struct blk *blks = NULL, *blkp = NULL; - struct blk_ext *blks_ext = NULL, *blkp_ext = NULL; - struct perf start; + uint16_t crc; + struct blk *blks = NULL, *blkp = NULL; + struct blk_ext *blks_ext = NULL, *blkp_ext = NULL; + struct perf start; - printf("crc16_t10dif_streaming_insert_perf:\n"); + printf("crc16_t10dif_streaming_insert_perf:\n"); - if (posix_memalign((void *)&blks, 1024, NBLOCKS * sizeof(*blks))) { - printf("alloc error: Fail"); - return -1; - } - if (posix_memalign((void *)&blks_ext, 1024, NBLOCKS * sizeof(*blks_ext))) { - printf("alloc error: Fail"); - return -1; - } + if (posix_memalign((void *) &blks, 1024, NBLOCKS * sizeof(*blks))) { + printf("alloc error: Fail"); + return -1; + } + if (posix_memalign((void *) &blks_ext, 1024, NBLOCKS * sizeof(*blks_ext))) { + printf("alloc error: Fail"); + return -1; + } - printf(" size blk: %zu, blk_ext: %zu, blk data: %zu, stream: %zu\n", - sizeof(*blks), sizeof(*blks_ext), sizeof(blks->data), - NBLOCKS * sizeof(blks->data)); - memset(blks, 0xe5, NBLOCKS * sizeof(*blks)); - memset(blks_ext, 0xe5, NBLOCKS * sizeof(*blks_ext)); + printf(" size blk: %zu, blk_ext: %zu, blk data: %zu, stream: %zu\n", sizeof(*blks), + sizeof(*blks_ext), sizeof(blks->data), NBLOCKS * sizeof(blks->data)); + memset(blks, 0xe5, NBLOCKS * sizeof(*blks)); + memset(blks_ext, 0xe5, NBLOCKS * sizeof(*blks_ext)); - printf("Start timed tests\n"); - fflush(0); + printf("Start timed tests\n"); + fflush(0); - // Copy and insert test - BENCHMARK(&start, BENCHMARK_TIME, - crc16_t10dif_copy_perf(blks, blkp, blks_ext, blkp_ext, &crc)); + // Copy and insert test + BENCHMARK(&start, BENCHMARK_TIME, + crc16_t10dif_copy_perf(blks, blkp, blks_ext, blkp_ext, &crc)); - printf("crc16_t10pi_op_copy_insert" TEST_TYPE_STR ": "); - perf_print(start, (long long)sizeof(blks->data) * NBLOCKS); + printf("crc16_t10pi_op_copy_insert" TEST_TYPE_STR ": "); + perf_print(start, (long long) sizeof(blks->data) * NBLOCKS); - printf("finish 0x%x\n", crc); - return 0; + printf("finish 0x%x\n", crc); + return 0; } diff --git a/crc/crc16_t10dif_perf.c b/crc/crc16_t10dif_perf.c index 7981707..c3fcd4a 100644 --- a/crc/crc16_t10dif_perf.c +++ b/crc/crc16_t10dif_perf.c @@ -35,46 +35,47 @@ #include "test.h" #ifndef GT_L3_CACHE -# define GT_L3_CACHE 32*1024*1024 /* some number > last level cache */ +#define GT_L3_CACHE 32 * 1024 * 1024 /* some number > last level cache */ #endif #if !defined(COLD_TEST) && !defined(TEST_CUSTOM) // Cached test, loop many times over small dataset -# define TEST_LEN 8*1024 -# define TEST_TYPE_STR "_warm" -#elif defined (COLD_TEST) +#define TEST_LEN 8 * 1024 +#define TEST_TYPE_STR "_warm" +#elif defined(COLD_TEST) // Uncached test. Pull from large mem base. -# define TEST_LEN (2 * GT_L3_CACHE) -# define TEST_TYPE_STR "_cold" +#define TEST_LEN (2 * GT_L3_CACHE) +#define TEST_TYPE_STR "_cold" #endif #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif #define TEST_MEM TEST_LEN -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - void *buf; - uint16_t crc; - struct perf start; + void *buf; + uint16_t crc; + struct perf start; - printf("crc16_t10dif_perf:\n"); + printf("crc16_t10dif_perf:\n"); - if (posix_memalign(&buf, 1024, TEST_LEN)) { - printf("alloc error: Fail"); - return -1; - } + if (posix_memalign(&buf, 1024, TEST_LEN)) { + printf("alloc error: Fail"); + return -1; + } - printf("Start timed tests\n"); - fflush(0); + printf("Start timed tests\n"); + fflush(0); - memset(buf, 0, TEST_LEN); - BENCHMARK(&start, BENCHMARK_TIME, crc = crc16_t10dif(TEST_SEED, buf, TEST_LEN)); - printf("crc16_t10dif" TEST_TYPE_STR ": "); - perf_print(start, (long long)TEST_LEN); + memset(buf, 0, TEST_LEN); + BENCHMARK(&start, BENCHMARK_TIME, crc = crc16_t10dif(TEST_SEED, buf, TEST_LEN)); + printf("crc16_t10dif" TEST_TYPE_STR ": "); + perf_print(start, (long long) TEST_LEN); - printf("finish 0x%x\n", crc); - return 0; + printf("finish 0x%x\n", crc); + return 0; } diff --git a/crc/crc16_t10dif_test.c b/crc/crc16_t10dif_test.c index 9407e37..4f64c39 100644 --- a/crc/crc16_t10dif_test.c +++ b/crc/crc16_t10dif_test.c @@ -36,163 +36,164 @@ #include "test.h" #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif #define MAX_BUF 4096 -#define TEST_SIZE 20 +#define TEST_SIZE 20 typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; -uint16_t crc16_t10dif_ref(uint16_t seed, uint8_t * buf, uint64_t len); +uint16_t +crc16_t10dif_ref(uint16_t seed, uint8_t *buf, uint64_t len); -void rand_buffer(unsigned char *buf, long buffer_size) +void +rand_buffer(unsigned char *buf, long buffer_size) { - long i; - for (i = 0; i < buffer_size; i++) - buf[i] = rand(); + long i; + for (i = 0; i < buffer_size; i++) + buf[i] = rand(); } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - int fail = 0; - u32 r = 0; - int i, s; - void *buf_raw = NULL; - unsigned char *buf; + int fail = 0; + u32 r = 0; + int i, s; + void *buf_raw = NULL; + unsigned char *buf; - printf("Test crc16_t10dif_test "); - if (posix_memalign(&buf_raw, 32, MAX_BUF * TEST_SIZE)) { - printf("alloc error: Fail"); - return -1; - } - buf = (unsigned char *)buf_raw; + printf("Test crc16_t10dif_test "); + if (posix_memalign(&buf_raw, 32, MAX_BUF * TEST_SIZE)) { + printf("alloc error: Fail"); + return -1; + } + buf = (unsigned char *) buf_raw; - srand(TEST_SEED); + srand(TEST_SEED); - // Test of all zeros - memset(buf, 0, MAX_BUF * 10); - u16 crc_ref = crc16_t10dif_ref(TEST_SEED, buf, MAX_BUF); - u16 crc_base = crc16_t10dif_base(TEST_SEED, buf, MAX_BUF); - u16 crc = crc16_t10dif(TEST_SEED, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("\n opt ref\n"); - printf(" ------ ------\n"); - printf("fail crc zero = 0x%4x 0x%4x 0x%4x \n", crc_ref, crc_base, crc); - } + // Test of all zeros + memset(buf, 0, MAX_BUF * 10); + u16 crc_ref = crc16_t10dif_ref(TEST_SEED, buf, MAX_BUF); + u16 crc_base = crc16_t10dif_base(TEST_SEED, buf, MAX_BUF); + u16 crc = crc16_t10dif(TEST_SEED, buf, MAX_BUF); + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("\n opt ref\n"); + printf(" ------ ------\n"); + printf("fail crc zero = 0x%4x 0x%4x 0x%4x \n", crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else - printf("."); + else + printf("."); #endif - // Another simple test pattern - memset(buf, 0x8a, MAX_BUF); - crc_ref = crc16_t10dif_ref(TEST_SEED, buf, MAX_BUF); - crc_base = crc16_t10dif_base(TEST_SEED, buf, MAX_BUF); - crc = crc16_t10dif(TEST_SEED, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc all 8a = 0x%4x 0x%4x 0x%4x\n", crc_ref, crc_base, crc); - } + // Another simple test pattern + memset(buf, 0x8a, MAX_BUF); + crc_ref = crc16_t10dif_ref(TEST_SEED, buf, MAX_BUF); + crc_base = crc16_t10dif_base(TEST_SEED, buf, MAX_BUF); + crc = crc16_t10dif(TEST_SEED, buf, MAX_BUF); + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc all 8a = 0x%4x 0x%4x 0x%4x\n", crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else - printf("."); + else + printf("."); #endif - // Do a few random tests + // Do a few random tests - rand_buffer(buf, MAX_BUF * TEST_SIZE); + rand_buffer(buf, MAX_BUF * TEST_SIZE); - for (i = 0; i < TEST_SIZE; i++) { - crc_ref = crc16_t10dif_ref(TEST_SEED, buf, MAX_BUF); - crc_base = crc16_t10dif_base(TEST_SEED, buf, MAX_BUF); - crc = crc16_t10dif(TEST_SEED, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc rand%3d = 0x%4x 0x%4x 0x%4x\n", i, crc_ref, crc_base, - crc); - } + for (i = 0; i < TEST_SIZE; i++) { + crc_ref = crc16_t10dif_ref(TEST_SEED, buf, MAX_BUF); + crc_base = crc16_t10dif_base(TEST_SEED, buf, MAX_BUF); + crc = crc16_t10dif(TEST_SEED, buf, MAX_BUF); + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc rand%3d = 0x%4x 0x%4x 0x%4x\n", i, crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (TEST_SIZE / 8) == 0) - printf("."); + else if (i % (TEST_SIZE / 8) == 0) + printf("."); #endif - buf += MAX_BUF; - } + buf += MAX_BUF; + } - // Do a few random sizes - buf = (unsigned char *)buf_raw; //reset buf - r = rand(); + // Do a few random sizes + buf = (unsigned char *) buf_raw; // reset buf + r = rand(); - for (i = MAX_BUF; i >= 0; i--) { - crc_ref = crc16_t10dif_ref(r, buf, i); - crc_base = crc16_t10dif_base(r, buf, i); - crc = crc16_t10dif(r, buf, i); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail random size%i 0x%8x 0x%8x 0x%8x\n", i, crc_ref, crc_base, - crc); - } + for (i = MAX_BUF; i >= 0; i--) { + crc_ref = crc16_t10dif_ref(r, buf, i); + crc_base = crc16_t10dif_base(r, buf, i); + crc = crc16_t10dif(r, buf, i); + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail random size%i 0x%8x 0x%8x 0x%8x\n", i, crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (MAX_BUF / 8) == 0) - printf("."); + else if (i % (MAX_BUF / 8) == 0) + printf("."); #endif - } + } - // Try different seeds - for (s = 0; s < 20; s++) { - buf = (unsigned char *)buf_raw; //reset buf + // Try different seeds + for (s = 0; s < 20; s++) { + buf = (unsigned char *) buf_raw; // reset buf - r = rand(); // just to get a new seed - rand_buffer(buf, MAX_BUF * TEST_SIZE); // new pseudo-rand data + r = rand(); // just to get a new seed + rand_buffer(buf, MAX_BUF * TEST_SIZE); // new pseudo-rand data #ifdef TEST_VERBOSE - printf("seed = 0x%x\n", r); + printf("seed = 0x%x\n", r); #endif - for (i = 0; i < TEST_SIZE; i++) { - crc_ref = crc16_t10dif_ref(r, buf, MAX_BUF); - crc_base = crc16_t10dif_base(r, buf, MAX_BUF); - crc = crc16_t10dif(r, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc rand%3d = 0x%4x 0x%4x 0x%4x\n", i, crc_ref, - crc_base, crc); - } + for (i = 0; i < TEST_SIZE; i++) { + crc_ref = crc16_t10dif_ref(r, buf, MAX_BUF); + crc_base = crc16_t10dif_base(r, buf, MAX_BUF); + crc = crc16_t10dif(r, buf, MAX_BUF); + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc rand%3d = 0x%4x 0x%4x 0x%4x\n", i, crc_ref, + crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (TEST_SIZE * 20 / 8) == 0) - printf("."); + else if (i % (TEST_SIZE * 20 / 8) == 0) + printf("."); #endif - buf += MAX_BUF; - } - } + buf += MAX_BUF; + } + } - // Run tests at end of buffer - buf = (unsigned char *)buf_raw; //reset buf - buf = buf + ((MAX_BUF - 1) * TEST_SIZE); //Line up TEST_SIZE from end - for (i = 0; i < TEST_SIZE; i++) { - crc_ref = crc16_t10dif_ref(TEST_SEED, buf + i, TEST_SIZE - i); - crc_base = crc16_t10dif_base(TEST_SEED, buf + i, TEST_SIZE - i); - crc = crc16_t10dif(TEST_SEED, buf + i, TEST_SIZE - i); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc eob rand%3d = 0x%4x 0x%4x 0x%4x\n", i, crc_ref, - crc_base, crc); - } + // Run tests at end of buffer + buf = (unsigned char *) buf_raw; // reset buf + buf = buf + ((MAX_BUF - 1) * TEST_SIZE); // Line up TEST_SIZE from end + for (i = 0; i < TEST_SIZE; i++) { + crc_ref = crc16_t10dif_ref(TEST_SEED, buf + i, TEST_SIZE - i); + crc_base = crc16_t10dif_base(TEST_SEED, buf + i, TEST_SIZE - i); + crc = crc16_t10dif(TEST_SEED, buf + i, TEST_SIZE - i); + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc eob rand%3d = 0x%4x 0x%4x 0x%4x\n", i, crc_ref, crc_base, + crc); + } #ifdef TEST_VERBOSE - else - printf("."); + else + printf("."); #endif - } + } - printf("Test done: %s\n", fail ? "Fail" : "Pass"); - if (fail) - printf("\nFailed %d tests\n", fail); + printf("Test done: %s\n", fail ? "Fail" : "Pass"); + if (fail) + printf("\nFailed %d tests\n", fail); - if (buf) - aligned_free(buf_raw); + if (buf) + aligned_free(buf_raw); - return fail; + return fail; } diff --git a/crc/crc32_funcs_test.c b/crc/crc32_funcs_test.c index 691d6ba..dbe40f3 100644 --- a/crc/crc32_funcs_test.c +++ b/crc/crc32_funcs_test.c @@ -36,306 +36,317 @@ #include "test.h" #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif #define MAX_BUF 4096 -#define TEST_SIZE 32 +#define TEST_SIZE 32 -typedef uint32_t(*crc32_func_t) (uint32_t, const uint8_t *, uint64_t); -typedef uint32_t(*crc32_func_t_base) (uint32_t, uint8_t *, uint64_t); -typedef uint32_t(*crc32_func_t_ref) (uint32_t, uint8_t *, uint64_t); +typedef uint32_t (*crc32_func_t)(uint32_t, const uint8_t *, uint64_t); +typedef uint32_t (*crc32_func_t_base)(uint32_t, uint8_t *, uint64_t); +typedef uint32_t (*crc32_func_t_ref)(uint32_t, uint8_t *, uint64_t); typedef struct func_case { - char *note; - crc32_func_t crc32_func_call; - crc32_func_t_base crc32_base_call; - crc32_func_t_ref crc32_ref_call; + char *note; + crc32_func_t crc32_func_call; + crc32_func_t_base crc32_base_call; + crc32_func_t_ref crc32_ref_call; } func_case_t; -uint32_t crc32_iscsi_wrap(uint32_t seed, const uint8_t * buf, uint64_t len) +uint32_t +crc32_iscsi_wrap(uint32_t seed, const uint8_t *buf, uint64_t len) { - return crc32_iscsi((uint8_t *) buf, len, seed); + return crc32_iscsi((uint8_t *) buf, len, seed); } -uint32_t crc32_iscsi_base_wrap(uint32_t seed, uint8_t * buf, uint64_t len) +uint32_t +crc32_iscsi_base_wrap(uint32_t seed, uint8_t *buf, uint64_t len) { - return crc32_iscsi_base(buf, len, seed); + return crc32_iscsi_base(buf, len, seed); } -uint32_t crc32_iscsi_ref_wrap(uint32_t seed, uint8_t * buf, uint64_t len) +uint32_t +crc32_iscsi_ref_wrap(uint32_t seed, uint8_t *buf, uint64_t len) { - return crc32_iscsi_ref(buf, len, seed); + return crc32_iscsi_ref(buf, len, seed); } func_case_t test_funcs[] = { - {"crc32_ieee", crc32_ieee, crc32_ieee_base, crc32_ieee_ref} - , - {"crc32_gzip_refl", crc32_gzip_refl, crc32_gzip_refl_base, crc32_gzip_refl_ref} - , - {"crc32_iscsi", crc32_iscsi_wrap, crc32_iscsi_base_wrap, crc32_iscsi_ref_wrap} + { "crc32_ieee", crc32_ieee, crc32_ieee_base, crc32_ieee_ref }, + { "crc32_gzip_refl", crc32_gzip_refl, crc32_gzip_refl_base, crc32_gzip_refl_ref }, + { "crc32_iscsi", crc32_iscsi_wrap, crc32_iscsi_base_wrap, crc32_iscsi_ref_wrap } }; // Generates pseudo-random data -void rand_buffer(unsigned char *buf, long buffer_size) +void +rand_buffer(unsigned char *buf, long buffer_size) { - long i; - for (i = 0; i < buffer_size; i++) - buf[i] = rand(); + long i; + for (i = 0; i < buffer_size; i++) + buf[i] = rand(); } // Test cases -int zeros_test(func_case_t * test_func); +int +zeros_test(func_case_t *test_func); -int simple_pattern_test(func_case_t * test_func); +int +simple_pattern_test(func_case_t *test_func); -int seeds_sizes_test(func_case_t * test_func); +int +seeds_sizes_test(func_case_t *test_func); -int eob_test(func_case_t * test_func); +int +eob_test(func_case_t *test_func); -int update_test(func_case_t * test_func); +int +update_test(func_case_t *test_func); void *buf_alloc = NULL; -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - int fail = 0, fail_case; - int i, ret; - func_case_t *test_func; + int fail = 0, fail_case; + int i, ret; + func_case_t *test_func; - // Align to TEST_SIZE boundary - ret = posix_memalign(&buf_alloc, TEST_SIZE, MAX_BUF * TEST_SIZE); - if (ret) { - printf("alloc error: Fail"); - return -1; - } - srand(TEST_SEED); - printf("CRC32 Tests\n"); + // Align to TEST_SIZE boundary + ret = posix_memalign(&buf_alloc, TEST_SIZE, MAX_BUF * TEST_SIZE); + if (ret) { + printf("alloc error: Fail"); + return -1; + } + srand(TEST_SEED); + printf("CRC32 Tests\n"); - for (i = 0; i < sizeof(test_funcs) / sizeof(test_funcs[0]); i++) { - fail_case = 0; - test_func = &test_funcs[i]; + for (i = 0; i < sizeof(test_funcs) / sizeof(test_funcs[0]); i++) { + fail_case = 0; + test_func = &test_funcs[i]; - printf("Test %s\t", test_func->note); - fail_case += zeros_test(test_func); - fail_case += simple_pattern_test(test_func); - fail_case += seeds_sizes_test(test_func); - fail_case += eob_test(test_func); - fail_case += update_test(test_func); - printf(" done: %s\n", fail_case ? "Fail" : "Pass"); + printf("Test %s\t", test_func->note); + fail_case += zeros_test(test_func); + fail_case += simple_pattern_test(test_func); + fail_case += seeds_sizes_test(test_func); + fail_case += eob_test(test_func); + fail_case += update_test(test_func); + printf(" done: %s\n", fail_case ? "Fail" : "Pass"); - if (fail_case) { - printf("\n%s Failed %d tests\n", test_func->note, fail_case); - fail++; - } - } + if (fail_case) { + printf("\n%s Failed %d tests\n", test_func->note, fail_case); + fail++; + } + } - printf("CRC32 Tests all done: %s\n", fail ? "Fail" : "Pass"); + printf("CRC32 Tests all done: %s\n", fail ? "Fail" : "Pass"); - aligned_free(buf_alloc); + aligned_free(buf_alloc); - return fail; + return fail; } // Test of all zeros -int zeros_test(func_case_t * test_func) +int +zeros_test(func_case_t *test_func) { - uint32_t crc_ref, crc_base, crc; - int fail = 0; - unsigned char *buf = NULL; + uint32_t crc_ref, crc_base, crc; + int fail = 0; + unsigned char *buf = NULL; - buf = (unsigned char *)buf_alloc; - memset(buf, 0, MAX_BUF * 10); - crc_ref = test_func->crc32_ref_call(TEST_SEED, buf, MAX_BUF * 10); - crc_base = test_func->crc32_base_call(TEST_SEED, buf, MAX_BUF * 10); - crc = test_func->crc32_func_call(TEST_SEED, buf, MAX_BUF * 10); + buf = (unsigned char *) buf_alloc; + memset(buf, 0, MAX_BUF * 10); + crc_ref = test_func->crc32_ref_call(TEST_SEED, buf, MAX_BUF * 10); + crc_base = test_func->crc32_base_call(TEST_SEED, buf, MAX_BUF * 10); + crc = test_func->crc32_func_call(TEST_SEED, buf, MAX_BUF * 10); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("\n opt ref\n"); - printf(" ------ ------\n"); - printf("fail crc zero = 0x%8x 0x%8x 0x%8x\n", crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("\n opt ref\n"); + printf(" ------ ------\n"); + printf("fail crc zero = 0x%8x 0x%8x 0x%8x\n", crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else - printf("."); + else + printf("."); #endif - return fail; + return fail; } // Another simple test pattern -int simple_pattern_test(func_case_t * test_func) +int +simple_pattern_test(func_case_t *test_func) { - uint32_t crc_ref, crc_base, crc; - int fail = 0; - unsigned char *buf = NULL; + uint32_t crc_ref, crc_base, crc; + int fail = 0; + unsigned char *buf = NULL; - buf = (unsigned char *)buf_alloc; - memset(buf, 0x8a, MAX_BUF); - crc_ref = test_func->crc32_ref_call(TEST_SEED, buf, MAX_BUF); - crc_base = test_func->crc32_base_call(TEST_SEED, buf, MAX_BUF); - crc = test_func->crc32_func_call(TEST_SEED, buf, MAX_BUF); + buf = (unsigned char *) buf_alloc; + memset(buf, 0x8a, MAX_BUF); + crc_ref = test_func->crc32_ref_call(TEST_SEED, buf, MAX_BUF); + crc_base = test_func->crc32_base_call(TEST_SEED, buf, MAX_BUF); + crc = test_func->crc32_func_call(TEST_SEED, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc all 8a = 0x%8x 0x%8x 0x%8x\n", crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc all 8a = 0x%8x 0x%8x 0x%8x\n", crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else - printf("."); + else + printf("."); #endif - return fail; + return fail; } -int seeds_sizes_test(func_case_t * test_func) +int +seeds_sizes_test(func_case_t *test_func) { - uint32_t crc_ref, crc_base, crc; - int fail = 0; - int i; - uint64_t r, s; - unsigned char *buf = NULL; + uint32_t crc_ref, crc_base, crc; + int fail = 0; + int i; + uint64_t r, s; + unsigned char *buf = NULL; - // Do a few random tests - buf = (unsigned char *)buf_alloc; //reset buf - r = rand(); - rand_buffer(buf, MAX_BUF * TEST_SIZE); + // Do a few random tests + buf = (unsigned char *) buf_alloc; // reset buf + r = rand(); + rand_buffer(buf, MAX_BUF * TEST_SIZE); - for (i = 0; i < TEST_SIZE; i++) { - crc_ref = test_func->crc32_ref_call(r, buf, MAX_BUF); - crc_base = test_func->crc32_base_call(r, buf, MAX_BUF); - crc = test_func->crc32_func_call(r, buf, MAX_BUF); + for (i = 0; i < TEST_SIZE; i++) { + crc_ref = test_func->crc32_ref_call(r, buf, MAX_BUF); + crc_base = test_func->crc32_base_call(r, buf, MAX_BUF); + crc = test_func->crc32_func_call(r, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc rand%3d = 0x%8x 0x%8x 0x%8x\n", i, crc_ref, crc_base, - crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc rand%3d = 0x%8x 0x%8x 0x%8x\n", i, crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (TEST_SIZE / 8) == 0) - printf("."); + else if (i % (TEST_SIZE / 8) == 0) + printf("."); #endif - buf += MAX_BUF; - } + buf += MAX_BUF; + } - // Do a few random sizes - buf = (unsigned char *)buf_alloc; //reset buf - r = rand(); + // Do a few random sizes + buf = (unsigned char *) buf_alloc; // reset buf + r = rand(); - for (i = MAX_BUF; i >= 0; i--) { - crc_ref = test_func->crc32_ref_call(r, buf, i); - crc_base = test_func->crc32_base_call(r, buf, i); - crc = test_func->crc32_func_call(r, buf, i); + for (i = MAX_BUF; i >= 0; i--) { + crc_ref = test_func->crc32_ref_call(r, buf, i); + crc_base = test_func->crc32_base_call(r, buf, i); + crc = test_func->crc32_func_call(r, buf, i); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail random size%i 0x%8x 0x%8x 0x%8x\n", i, crc_ref, crc_base, - crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail random size%i 0x%8x 0x%8x 0x%8x\n", i, crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (MAX_BUF / 8) == 0) - printf("."); + else if (i % (MAX_BUF / 8) == 0) + printf("."); #endif - } + } - // Try different seeds - for (s = 0; s < 20; s++) { - buf = (unsigned char *)buf_alloc; //reset buf + // Try different seeds + for (s = 0; s < 20; s++) { + buf = (unsigned char *) buf_alloc; // reset buf - r = rand(); // just to get a new seed - rand_buffer(buf, MAX_BUF * TEST_SIZE); // new pseudo-rand data + r = rand(); // just to get a new seed + rand_buffer(buf, MAX_BUF * TEST_SIZE); // new pseudo-rand data #ifdef TEST_VERBOSE - printf("seed = 0x%lx\n", r); + printf("seed = 0x%lx\n", r); #endif - for (i = 0; i < TEST_SIZE; i++) { - crc_ref = test_func->crc32_ref_call(r, buf, MAX_BUF); - crc_base = test_func->crc32_base_call(r, buf, MAX_BUF); - crc = test_func->crc32_func_call(r, buf, MAX_BUF); + for (i = 0; i < TEST_SIZE; i++) { + crc_ref = test_func->crc32_ref_call(r, buf, MAX_BUF); + crc_base = test_func->crc32_base_call(r, buf, MAX_BUF); + crc = test_func->crc32_func_call(r, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc rand%3d = 0x%8x 0x%8x 0x%8x\n", i, crc_ref, - crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc rand%3d = 0x%8x 0x%8x 0x%8x\n", i, crc_ref, + crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (TEST_SIZE * 20 / 8) == 0) - printf("."); + else if (i % (TEST_SIZE * 20 / 8) == 0) + printf("."); #endif - buf += MAX_BUF; - } - } + buf += MAX_BUF; + } + } - return fail; + return fail; } // Run tests at end of buffer -int eob_test(func_case_t * test_func) +int +eob_test(func_case_t *test_func) { - uint32_t crc_ref, crc_base, crc; - int fail = 0; - int i; - unsigned char *buf = NULL; + uint32_t crc_ref, crc_base, crc; + int fail = 0; + int i; + unsigned char *buf = NULL; - // Null test - if (0 != test_func->crc32_func_call(0, NULL, 0)) { - fail++; - printf("crc null test fail\n"); - } + // Null test + if (0 != test_func->crc32_func_call(0, NULL, 0)) { + fail++; + printf("crc null test fail\n"); + } - buf = (unsigned char *)buf_alloc; //reset buf - buf = buf + ((MAX_BUF - 1) * TEST_SIZE); //Line up TEST_SIZE from end - for (i = 0; i <= TEST_SIZE; i++) { - crc_ref = test_func->crc32_ref_call(TEST_SEED, buf + i, TEST_SIZE - i); - crc_base = test_func->crc32_base_call(TEST_SEED, buf + i, TEST_SIZE - i); - crc = test_func->crc32_func_call(TEST_SEED, buf + i, TEST_SIZE - i); + buf = (unsigned char *) buf_alloc; // reset buf + buf = buf + ((MAX_BUF - 1) * TEST_SIZE); // Line up TEST_SIZE from end + for (i = 0; i <= TEST_SIZE; i++) { + crc_ref = test_func->crc32_ref_call(TEST_SEED, buf + i, TEST_SIZE - i); + crc_base = test_func->crc32_base_call(TEST_SEED, buf + i, TEST_SIZE - i); + crc = test_func->crc32_func_call(TEST_SEED, buf + i, TEST_SIZE - i); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc eob rand%3d = 0x%8x 0x%8x 0x%8x\n", i, crc_ref, - crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc eob rand%3d = 0x%8x 0x%8x 0x%8x\n", i, crc_ref, crc_base, + crc); + } #ifdef TEST_VERBOSE - else if (i % (TEST_SIZE / 8) == 0) - printf("."); + else if (i % (TEST_SIZE / 8) == 0) + printf("."); #endif - } + } - return fail; + return fail; } -int update_test(func_case_t * test_func) +int +update_test(func_case_t *test_func) { - uint32_t crc_ref, crc_base, crc; - int fail = 0; - int i; - uint64_t r; - unsigned char *buf = NULL; + uint32_t crc_ref, crc_base, crc; + int fail = 0; + int i; + uint64_t r; + unsigned char *buf = NULL; - buf = (unsigned char *)buf_alloc; //reset buf - r = rand(); - // Process the whole buf with reference func single call. - crc_ref = test_func->crc32_ref_call(r, buf, MAX_BUF * TEST_SIZE); - crc_base = test_func->crc32_base_call(r, buf, MAX_BUF * TEST_SIZE); - // Process buf with update method. - for (i = 0; i < TEST_SIZE; i++) { - crc = test_func->crc32_func_call(r, buf, MAX_BUF); - // Update crc seeds and buf pointer. - r = crc; - buf += MAX_BUF; - } + buf = (unsigned char *) buf_alloc; // reset buf + r = rand(); + // Process the whole buf with reference func single call. + crc_ref = test_func->crc32_ref_call(r, buf, MAX_BUF * TEST_SIZE); + crc_base = test_func->crc32_base_call(r, buf, MAX_BUF * TEST_SIZE); + // Process buf with update method. + for (i = 0; i < TEST_SIZE; i++) { + crc = test_func->crc32_func_call(r, buf, MAX_BUF); + // Update crc seeds and buf pointer. + r = crc; + buf += MAX_BUF; + } - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc rand%3d = 0x%8x 0x%8x 0x%8x\n", i, crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc rand%3d = 0x%8x 0x%8x 0x%8x\n", i, crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else - printf("."); + else + printf("."); #endif - return fail; + return fail; } diff --git a/crc/crc32_gzip_refl_perf.c b/crc/crc32_gzip_refl_perf.c index 4c6f74d..3242287 100644 --- a/crc/crc32_gzip_refl_perf.c +++ b/crc/crc32_gzip_refl_perf.c @@ -35,58 +35,58 @@ #include "test.h" #ifndef GT_L3_CACHE -# define GT_L3_CACHE 32*1024*1024 /* some number > last level cache */ +#define GT_L3_CACHE 32 * 1024 * 1024 /* some number > last level cache */ #endif #if !defined(COLD_TEST) && !defined(TEST_CUSTOM) // Cached test, loop many times over small dataset -# define TEST_LEN 8*1024 -# define TEST_TYPE_STR "_warm" -#elif defined (COLD_TEST) +#define TEST_LEN 8 * 1024 +#define TEST_TYPE_STR "_warm" +#elif defined(COLD_TEST) // Uncached test. Pull from large mem base. -# define TEST_LEN (2 * GT_L3_CACHE) -# define TEST_TYPE_STR "_cold" +#define TEST_LEN (2 * GT_L3_CACHE) +#define TEST_TYPE_STR "_cold" #endif #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif #define TEST_MEM TEST_LEN -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - void *buf; - uint32_t crc; - struct perf start; + void *buf; + uint32_t crc; + struct perf start; - printf("crc32_gzip_refl_perf:\n"); + printf("crc32_gzip_refl_perf:\n"); - if (posix_memalign(&buf, 1024, TEST_LEN)) { - printf("alloc error: Fail"); - return -1; - } + if (posix_memalign(&buf, 1024, TEST_LEN)) { + printf("alloc error: Fail"); + return -1; + } - printf("Start timed tests\n"); - fflush(0); + printf("Start timed tests\n"); + fflush(0); - memset(buf, 0, TEST_LEN); - BENCHMARK(&start, BENCHMARK_TIME, crc = crc32_gzip_refl(TEST_SEED, buf, TEST_LEN)); - printf("crc32_gzip_refl" TEST_TYPE_STR ": "); - perf_print(start, (long long)TEST_LEN); + memset(buf, 0, TEST_LEN); + BENCHMARK(&start, BENCHMARK_TIME, crc = crc32_gzip_refl(TEST_SEED, buf, TEST_LEN)); + printf("crc32_gzip_refl" TEST_TYPE_STR ": "); + perf_print(start, (long long) TEST_LEN); - printf("finish 0x%x\n", crc); + printf("finish 0x%x\n", crc); - printf("crc32_gzip_refl_base_perf:\n"); - printf("Start timed tests\n"); - fflush(0); + printf("crc32_gzip_refl_base_perf:\n"); + printf("Start timed tests\n"); + fflush(0); - BENCHMARK(&start, BENCHMARK_TIME, crc = - crc32_gzip_refl_base(TEST_SEED, buf, TEST_LEN)); - printf("crc32_gzip_refl_base" TEST_TYPE_STR ": "); - perf_print(start, (long long)TEST_LEN); + BENCHMARK(&start, BENCHMARK_TIME, crc = crc32_gzip_refl_base(TEST_SEED, buf, TEST_LEN)); + printf("crc32_gzip_refl_base" TEST_TYPE_STR ": "); + perf_print(start, (long long) TEST_LEN); - printf("finish 0x%x\n", crc); + printf("finish 0x%x\n", crc); - return 0; + return 0; } diff --git a/crc/crc32_ieee_perf.c b/crc/crc32_ieee_perf.c index 67c506c..733747a 100644 --- a/crc/crc32_ieee_perf.c +++ b/crc/crc32_ieee_perf.c @@ -35,46 +35,47 @@ #include "test.h" #ifndef GT_L3_CACHE -# define GT_L3_CACHE 32*1024*1024 /* some number > last level cache */ +#define GT_L3_CACHE 32 * 1024 * 1024 /* some number > last level cache */ #endif #if !defined(COLD_TEST) && !defined(TEST_CUSTOM) // Cached test, loop many times over small dataset -# define TEST_LEN 8*1024 -# define TEST_TYPE_STR "_warm" -#elif defined (COLD_TEST) +#define TEST_LEN 8 * 1024 +#define TEST_TYPE_STR "_warm" +#elif defined(COLD_TEST) // Uncached test. Pull from large mem base. -# define TEST_LEN (2 * GT_L3_CACHE) -# define TEST_TYPE_STR "_cold" +#define TEST_LEN (2 * GT_L3_CACHE) +#define TEST_TYPE_STR "_cold" #endif #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif #define TEST_MEM TEST_LEN -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - void *buf; - uint32_t crc; - struct perf start; + void *buf; + uint32_t crc; + struct perf start; - printf("crc32_ieee_perf:\n"); + printf("crc32_ieee_perf:\n"); - if (posix_memalign(&buf, 1024, TEST_LEN)) { - printf("alloc error: Fail"); - return -1; - } + if (posix_memalign(&buf, 1024, TEST_LEN)) { + printf("alloc error: Fail"); + return -1; + } - printf("Start timed tests\n"); - fflush(0); + printf("Start timed tests\n"); + fflush(0); - memset(buf, 0, TEST_LEN); - BENCHMARK(&start, BENCHMARK_TIME, crc = crc32_ieee(TEST_SEED, buf, TEST_LEN)); - printf("crc32_ieee" TEST_TYPE_STR ": "); - perf_print(start, (long long)TEST_LEN); + memset(buf, 0, TEST_LEN); + BENCHMARK(&start, BENCHMARK_TIME, crc = crc32_ieee(TEST_SEED, buf, TEST_LEN)); + printf("crc32_ieee" TEST_TYPE_STR ": "); + perf_print(start, (long long) TEST_LEN); - printf("finish 0x%x\n", crc); - return 0; + printf("finish 0x%x\n", crc); + return 0; } diff --git a/crc/crc32_iscsi_perf.c b/crc/crc32_iscsi_perf.c index 52067c4..e754da5 100644 --- a/crc/crc32_iscsi_perf.c +++ b/crc/crc32_iscsi_perf.c @@ -35,46 +35,47 @@ #include "test.h" #ifndef GT_L3_CACHE -# define GT_L3_CACHE 32*1024*1024 /* some number > last level cache */ +#define GT_L3_CACHE 32 * 1024 * 1024 /* some number > last level cache */ #endif #if !defined(COLD_TEST) && !defined(TEST_CUSTOM) // Cached test, loop many times over small dataset -# define TEST_LEN 8*1024 -# define TEST_TYPE_STR "_warm" -#elif defined (COLD_TEST) +#define TEST_LEN 8 * 1024 +#define TEST_TYPE_STR "_warm" +#elif defined(COLD_TEST) // Uncached test. Pull from large mem base. -# define TEST_LEN (2 * GT_L3_CACHE) -# define TEST_TYPE_STR "_cold" +#define TEST_LEN (2 * GT_L3_CACHE) +#define TEST_TYPE_STR "_cold" #endif #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif #define TEST_MEM TEST_LEN -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - void *buf; - uint32_t crc; - struct perf start; + void *buf; + uint32_t crc; + struct perf start; - printf("crc32_iscsi_perf:\n"); + printf("crc32_iscsi_perf:\n"); - if (posix_memalign(&buf, 1024, TEST_LEN)) { - printf("alloc error: Fail"); - return -1; - } + if (posix_memalign(&buf, 1024, TEST_LEN)) { + printf("alloc error: Fail"); + return -1; + } - printf("Start timed tests\n"); - fflush(0); + printf("Start timed tests\n"); + fflush(0); - memset(buf, 0, TEST_LEN); - BENCHMARK(&start, BENCHMARK_TIME, crc = crc32_iscsi(buf, TEST_LEN, TEST_SEED)); - printf("crc32_iscsi" TEST_TYPE_STR ": "); - perf_print(start, (long long)TEST_LEN); + memset(buf, 0, TEST_LEN); + BENCHMARK(&start, BENCHMARK_TIME, crc = crc32_iscsi(buf, TEST_LEN, TEST_SEED)); + printf("crc32_iscsi" TEST_TYPE_STR ": "); + perf_print(start, (long long) TEST_LEN); - printf("finish 0x%x\n", crc); - return 0; + printf("finish 0x%x\n", crc); + return 0; } diff --git a/crc/crc64_base.c b/crc/crc64_base.c index e69b95b..ef0cd6e 100644 --- a/crc/crc64_base.c +++ b/crc/crc64_base.c @@ -30,1145 +30,641 @@ #include "crc64.h" static const uint64_t crc64_ecma_refl_table[256] = { - 0x0000000000000000ULL, 0xb32e4cbe03a75f6fULL, - 0xf4843657a840a05bULL, 0x47aa7ae9abe7ff34ULL, - 0x7bd0c384ff8f5e33ULL, 0xc8fe8f3afc28015cULL, - 0x8f54f5d357cffe68ULL, 0x3c7ab96d5468a107ULL, - 0xf7a18709ff1ebc66ULL, 0x448fcbb7fcb9e309ULL, - 0x0325b15e575e1c3dULL, 0xb00bfde054f94352ULL, - 0x8c71448d0091e255ULL, 0x3f5f08330336bd3aULL, - 0x78f572daa8d1420eULL, 0xcbdb3e64ab761d61ULL, - 0x7d9ba13851336649ULL, 0xceb5ed8652943926ULL, - 0x891f976ff973c612ULL, 0x3a31dbd1fad4997dULL, - 0x064b62bcaebc387aULL, 0xb5652e02ad1b6715ULL, - 0xf2cf54eb06fc9821ULL, 0x41e11855055bc74eULL, - 0x8a3a2631ae2dda2fULL, 0x39146a8fad8a8540ULL, - 0x7ebe1066066d7a74ULL, 0xcd905cd805ca251bULL, - 0xf1eae5b551a2841cULL, 0x42c4a90b5205db73ULL, - 0x056ed3e2f9e22447ULL, 0xb6409f5cfa457b28ULL, - 0xfb374270a266cc92ULL, 0x48190ecea1c193fdULL, - 0x0fb374270a266cc9ULL, 0xbc9d3899098133a6ULL, - 0x80e781f45de992a1ULL, 0x33c9cd4a5e4ecdceULL, - 0x7463b7a3f5a932faULL, 0xc74dfb1df60e6d95ULL, - 0x0c96c5795d7870f4ULL, 0xbfb889c75edf2f9bULL, - 0xf812f32ef538d0afULL, 0x4b3cbf90f69f8fc0ULL, - 0x774606fda2f72ec7ULL, 0xc4684a43a15071a8ULL, - 0x83c230aa0ab78e9cULL, 0x30ec7c140910d1f3ULL, - 0x86ace348f355aadbULL, 0x3582aff6f0f2f5b4ULL, - 0x7228d51f5b150a80ULL, 0xc10699a158b255efULL, - 0xfd7c20cc0cdaf4e8ULL, 0x4e526c720f7dab87ULL, - 0x09f8169ba49a54b3ULL, 0xbad65a25a73d0bdcULL, - 0x710d64410c4b16bdULL, 0xc22328ff0fec49d2ULL, - 0x85895216a40bb6e6ULL, 0x36a71ea8a7ace989ULL, - 0x0adda7c5f3c4488eULL, 0xb9f3eb7bf06317e1ULL, - 0xfe5991925b84e8d5ULL, 0x4d77dd2c5823b7baULL, - 0x64b62bcaebc387a1ULL, 0xd7986774e864d8ceULL, - 0x90321d9d438327faULL, 0x231c512340247895ULL, - 0x1f66e84e144cd992ULL, 0xac48a4f017eb86fdULL, - 0xebe2de19bc0c79c9ULL, 0x58cc92a7bfab26a6ULL, - 0x9317acc314dd3bc7ULL, 0x2039e07d177a64a8ULL, - 0x67939a94bc9d9b9cULL, 0xd4bdd62abf3ac4f3ULL, - 0xe8c76f47eb5265f4ULL, 0x5be923f9e8f53a9bULL, - 0x1c4359104312c5afULL, 0xaf6d15ae40b59ac0ULL, - 0x192d8af2baf0e1e8ULL, 0xaa03c64cb957be87ULL, - 0xeda9bca512b041b3ULL, 0x5e87f01b11171edcULL, - 0x62fd4976457fbfdbULL, 0xd1d305c846d8e0b4ULL, - 0x96797f21ed3f1f80ULL, 0x2557339fee9840efULL, - 0xee8c0dfb45ee5d8eULL, 0x5da24145464902e1ULL, - 0x1a083bacedaefdd5ULL, 0xa9267712ee09a2baULL, - 0x955cce7fba6103bdULL, 0x267282c1b9c65cd2ULL, - 0x61d8f8281221a3e6ULL, 0xd2f6b4961186fc89ULL, - 0x9f8169ba49a54b33ULL, 0x2caf25044a02145cULL, - 0x6b055fede1e5eb68ULL, 0xd82b1353e242b407ULL, - 0xe451aa3eb62a1500ULL, 0x577fe680b58d4a6fULL, - 0x10d59c691e6ab55bULL, 0xa3fbd0d71dcdea34ULL, - 0x6820eeb3b6bbf755ULL, 0xdb0ea20db51ca83aULL, - 0x9ca4d8e41efb570eULL, 0x2f8a945a1d5c0861ULL, - 0x13f02d374934a966ULL, 0xa0de61894a93f609ULL, - 0xe7741b60e174093dULL, 0x545a57dee2d35652ULL, - 0xe21ac88218962d7aULL, 0x5134843c1b317215ULL, - 0x169efed5b0d68d21ULL, 0xa5b0b26bb371d24eULL, - 0x99ca0b06e7197349ULL, 0x2ae447b8e4be2c26ULL, - 0x6d4e3d514f59d312ULL, 0xde6071ef4cfe8c7dULL, - 0x15bb4f8be788911cULL, 0xa6950335e42fce73ULL, - 0xe13f79dc4fc83147ULL, 0x521135624c6f6e28ULL, - 0x6e6b8c0f1807cf2fULL, 0xdd45c0b11ba09040ULL, - 0x9aefba58b0476f74ULL, 0x29c1f6e6b3e0301bULL, - 0xc96c5795d7870f42ULL, 0x7a421b2bd420502dULL, - 0x3de861c27fc7af19ULL, 0x8ec62d7c7c60f076ULL, - 0xb2bc941128085171ULL, 0x0192d8af2baf0e1eULL, - 0x4638a2468048f12aULL, 0xf516eef883efae45ULL, - 0x3ecdd09c2899b324ULL, 0x8de39c222b3eec4bULL, - 0xca49e6cb80d9137fULL, 0x7967aa75837e4c10ULL, - 0x451d1318d716ed17ULL, 0xf6335fa6d4b1b278ULL, - 0xb199254f7f564d4cULL, 0x02b769f17cf11223ULL, - 0xb4f7f6ad86b4690bULL, 0x07d9ba1385133664ULL, - 0x4073c0fa2ef4c950ULL, 0xf35d8c442d53963fULL, - 0xcf273529793b3738ULL, 0x7c0979977a9c6857ULL, - 0x3ba3037ed17b9763ULL, 0x888d4fc0d2dcc80cULL, - 0x435671a479aad56dULL, 0xf0783d1a7a0d8a02ULL, - 0xb7d247f3d1ea7536ULL, 0x04fc0b4dd24d2a59ULL, - 0x3886b22086258b5eULL, 0x8ba8fe9e8582d431ULL, - 0xcc0284772e652b05ULL, 0x7f2cc8c92dc2746aULL, - 0x325b15e575e1c3d0ULL, 0x8175595b76469cbfULL, - 0xc6df23b2dda1638bULL, 0x75f16f0cde063ce4ULL, - 0x498bd6618a6e9de3ULL, 0xfaa59adf89c9c28cULL, - 0xbd0fe036222e3db8ULL, 0x0e21ac88218962d7ULL, - 0xc5fa92ec8aff7fb6ULL, 0x76d4de52895820d9ULL, - 0x317ea4bb22bfdfedULL, 0x8250e80521188082ULL, - 0xbe2a516875702185ULL, 0x0d041dd676d77eeaULL, - 0x4aae673fdd3081deULL, 0xf9802b81de97deb1ULL, - 0x4fc0b4dd24d2a599ULL, 0xfceef8632775faf6ULL, - 0xbb44828a8c9205c2ULL, 0x086ace348f355aadULL, - 0x34107759db5dfbaaULL, 0x873e3be7d8faa4c5ULL, - 0xc094410e731d5bf1ULL, 0x73ba0db070ba049eULL, - 0xb86133d4dbcc19ffULL, 0x0b4f7f6ad86b4690ULL, - 0x4ce50583738cb9a4ULL, 0xffcb493d702be6cbULL, - 0xc3b1f050244347ccULL, 0x709fbcee27e418a3ULL, - 0x3735c6078c03e797ULL, 0x841b8ab98fa4b8f8ULL, - 0xadda7c5f3c4488e3ULL, 0x1ef430e13fe3d78cULL, - 0x595e4a08940428b8ULL, 0xea7006b697a377d7ULL, - 0xd60abfdbc3cbd6d0ULL, 0x6524f365c06c89bfULL, - 0x228e898c6b8b768bULL, 0x91a0c532682c29e4ULL, - 0x5a7bfb56c35a3485ULL, 0xe955b7e8c0fd6beaULL, - 0xaeffcd016b1a94deULL, 0x1dd181bf68bdcbb1ULL, - 0x21ab38d23cd56ab6ULL, 0x9285746c3f7235d9ULL, - 0xd52f0e859495caedULL, 0x6601423b97329582ULL, - 0xd041dd676d77eeaaULL, 0x636f91d96ed0b1c5ULL, - 0x24c5eb30c5374ef1ULL, 0x97eba78ec690119eULL, - 0xab911ee392f8b099ULL, 0x18bf525d915feff6ULL, - 0x5f1528b43ab810c2ULL, 0xec3b640a391f4fadULL, - 0x27e05a6e926952ccULL, 0x94ce16d091ce0da3ULL, - 0xd3646c393a29f297ULL, 0x604a2087398eadf8ULL, - 0x5c3099ea6de60cffULL, 0xef1ed5546e415390ULL, - 0xa8b4afbdc5a6aca4ULL, 0x1b9ae303c601f3cbULL, - 0x56ed3e2f9e224471ULL, 0xe5c372919d851b1eULL, - 0xa26908783662e42aULL, 0x114744c635c5bb45ULL, - 0x2d3dfdab61ad1a42ULL, 0x9e13b115620a452dULL, - 0xd9b9cbfcc9edba19ULL, 0x6a978742ca4ae576ULL, - 0xa14cb926613cf817ULL, 0x1262f598629ba778ULL, - 0x55c88f71c97c584cULL, 0xe6e6c3cfcadb0723ULL, - 0xda9c7aa29eb3a624ULL, 0x69b2361c9d14f94bULL, - 0x2e184cf536f3067fULL, 0x9d36004b35545910ULL, - 0x2b769f17cf112238ULL, 0x9858d3a9ccb67d57ULL, - 0xdff2a94067518263ULL, 0x6cdce5fe64f6dd0cULL, - 0x50a65c93309e7c0bULL, 0xe388102d33392364ULL, - 0xa4226ac498dedc50ULL, 0x170c267a9b79833fULL, - 0xdcd7181e300f9e5eULL, 0x6ff954a033a8c131ULL, - 0x28532e49984f3e05ULL, 0x9b7d62f79be8616aULL, - 0xa707db9acf80c06dULL, 0x14299724cc279f02ULL, - 0x5383edcd67c06036ULL, 0xe0ada17364673f59ULL + 0x0000000000000000ULL, 0xb32e4cbe03a75f6fULL, 0xf4843657a840a05bULL, 0x47aa7ae9abe7ff34ULL, + 0x7bd0c384ff8f5e33ULL, 0xc8fe8f3afc28015cULL, 0x8f54f5d357cffe68ULL, 0x3c7ab96d5468a107ULL, + 0xf7a18709ff1ebc66ULL, 0x448fcbb7fcb9e309ULL, 0x0325b15e575e1c3dULL, 0xb00bfde054f94352ULL, + 0x8c71448d0091e255ULL, 0x3f5f08330336bd3aULL, 0x78f572daa8d1420eULL, 0xcbdb3e64ab761d61ULL, + 0x7d9ba13851336649ULL, 0xceb5ed8652943926ULL, 0x891f976ff973c612ULL, 0x3a31dbd1fad4997dULL, + 0x064b62bcaebc387aULL, 0xb5652e02ad1b6715ULL, 0xf2cf54eb06fc9821ULL, 0x41e11855055bc74eULL, + 0x8a3a2631ae2dda2fULL, 0x39146a8fad8a8540ULL, 0x7ebe1066066d7a74ULL, 0xcd905cd805ca251bULL, + 0xf1eae5b551a2841cULL, 0x42c4a90b5205db73ULL, 0x056ed3e2f9e22447ULL, 0xb6409f5cfa457b28ULL, + 0xfb374270a266cc92ULL, 0x48190ecea1c193fdULL, 0x0fb374270a266cc9ULL, 0xbc9d3899098133a6ULL, + 0x80e781f45de992a1ULL, 0x33c9cd4a5e4ecdceULL, 0x7463b7a3f5a932faULL, 0xc74dfb1df60e6d95ULL, + 0x0c96c5795d7870f4ULL, 0xbfb889c75edf2f9bULL, 0xf812f32ef538d0afULL, 0x4b3cbf90f69f8fc0ULL, + 0x774606fda2f72ec7ULL, 0xc4684a43a15071a8ULL, 0x83c230aa0ab78e9cULL, 0x30ec7c140910d1f3ULL, + 0x86ace348f355aadbULL, 0x3582aff6f0f2f5b4ULL, 0x7228d51f5b150a80ULL, 0xc10699a158b255efULL, + 0xfd7c20cc0cdaf4e8ULL, 0x4e526c720f7dab87ULL, 0x09f8169ba49a54b3ULL, 0xbad65a25a73d0bdcULL, + 0x710d64410c4b16bdULL, 0xc22328ff0fec49d2ULL, 0x85895216a40bb6e6ULL, 0x36a71ea8a7ace989ULL, + 0x0adda7c5f3c4488eULL, 0xb9f3eb7bf06317e1ULL, 0xfe5991925b84e8d5ULL, 0x4d77dd2c5823b7baULL, + 0x64b62bcaebc387a1ULL, 0xd7986774e864d8ceULL, 0x90321d9d438327faULL, 0x231c512340247895ULL, + 0x1f66e84e144cd992ULL, 0xac48a4f017eb86fdULL, 0xebe2de19bc0c79c9ULL, 0x58cc92a7bfab26a6ULL, + 0x9317acc314dd3bc7ULL, 0x2039e07d177a64a8ULL, 0x67939a94bc9d9b9cULL, 0xd4bdd62abf3ac4f3ULL, + 0xe8c76f47eb5265f4ULL, 0x5be923f9e8f53a9bULL, 0x1c4359104312c5afULL, 0xaf6d15ae40b59ac0ULL, + 0x192d8af2baf0e1e8ULL, 0xaa03c64cb957be87ULL, 0xeda9bca512b041b3ULL, 0x5e87f01b11171edcULL, + 0x62fd4976457fbfdbULL, 0xd1d305c846d8e0b4ULL, 0x96797f21ed3f1f80ULL, 0x2557339fee9840efULL, + 0xee8c0dfb45ee5d8eULL, 0x5da24145464902e1ULL, 0x1a083bacedaefdd5ULL, 0xa9267712ee09a2baULL, + 0x955cce7fba6103bdULL, 0x267282c1b9c65cd2ULL, 0x61d8f8281221a3e6ULL, 0xd2f6b4961186fc89ULL, + 0x9f8169ba49a54b33ULL, 0x2caf25044a02145cULL, 0x6b055fede1e5eb68ULL, 0xd82b1353e242b407ULL, + 0xe451aa3eb62a1500ULL, 0x577fe680b58d4a6fULL, 0x10d59c691e6ab55bULL, 0xa3fbd0d71dcdea34ULL, + 0x6820eeb3b6bbf755ULL, 0xdb0ea20db51ca83aULL, 0x9ca4d8e41efb570eULL, 0x2f8a945a1d5c0861ULL, + 0x13f02d374934a966ULL, 0xa0de61894a93f609ULL, 0xe7741b60e174093dULL, 0x545a57dee2d35652ULL, + 0xe21ac88218962d7aULL, 0x5134843c1b317215ULL, 0x169efed5b0d68d21ULL, 0xa5b0b26bb371d24eULL, + 0x99ca0b06e7197349ULL, 0x2ae447b8e4be2c26ULL, 0x6d4e3d514f59d312ULL, 0xde6071ef4cfe8c7dULL, + 0x15bb4f8be788911cULL, 0xa6950335e42fce73ULL, 0xe13f79dc4fc83147ULL, 0x521135624c6f6e28ULL, + 0x6e6b8c0f1807cf2fULL, 0xdd45c0b11ba09040ULL, 0x9aefba58b0476f74ULL, 0x29c1f6e6b3e0301bULL, + 0xc96c5795d7870f42ULL, 0x7a421b2bd420502dULL, 0x3de861c27fc7af19ULL, 0x8ec62d7c7c60f076ULL, + 0xb2bc941128085171ULL, 0x0192d8af2baf0e1eULL, 0x4638a2468048f12aULL, 0xf516eef883efae45ULL, + 0x3ecdd09c2899b324ULL, 0x8de39c222b3eec4bULL, 0xca49e6cb80d9137fULL, 0x7967aa75837e4c10ULL, + 0x451d1318d716ed17ULL, 0xf6335fa6d4b1b278ULL, 0xb199254f7f564d4cULL, 0x02b769f17cf11223ULL, + 0xb4f7f6ad86b4690bULL, 0x07d9ba1385133664ULL, 0x4073c0fa2ef4c950ULL, 0xf35d8c442d53963fULL, + 0xcf273529793b3738ULL, 0x7c0979977a9c6857ULL, 0x3ba3037ed17b9763ULL, 0x888d4fc0d2dcc80cULL, + 0x435671a479aad56dULL, 0xf0783d1a7a0d8a02ULL, 0xb7d247f3d1ea7536ULL, 0x04fc0b4dd24d2a59ULL, + 0x3886b22086258b5eULL, 0x8ba8fe9e8582d431ULL, 0xcc0284772e652b05ULL, 0x7f2cc8c92dc2746aULL, + 0x325b15e575e1c3d0ULL, 0x8175595b76469cbfULL, 0xc6df23b2dda1638bULL, 0x75f16f0cde063ce4ULL, + 0x498bd6618a6e9de3ULL, 0xfaa59adf89c9c28cULL, 0xbd0fe036222e3db8ULL, 0x0e21ac88218962d7ULL, + 0xc5fa92ec8aff7fb6ULL, 0x76d4de52895820d9ULL, 0x317ea4bb22bfdfedULL, 0x8250e80521188082ULL, + 0xbe2a516875702185ULL, 0x0d041dd676d77eeaULL, 0x4aae673fdd3081deULL, 0xf9802b81de97deb1ULL, + 0x4fc0b4dd24d2a599ULL, 0xfceef8632775faf6ULL, 0xbb44828a8c9205c2ULL, 0x086ace348f355aadULL, + 0x34107759db5dfbaaULL, 0x873e3be7d8faa4c5ULL, 0xc094410e731d5bf1ULL, 0x73ba0db070ba049eULL, + 0xb86133d4dbcc19ffULL, 0x0b4f7f6ad86b4690ULL, 0x4ce50583738cb9a4ULL, 0xffcb493d702be6cbULL, + 0xc3b1f050244347ccULL, 0x709fbcee27e418a3ULL, 0x3735c6078c03e797ULL, 0x841b8ab98fa4b8f8ULL, + 0xadda7c5f3c4488e3ULL, 0x1ef430e13fe3d78cULL, 0x595e4a08940428b8ULL, 0xea7006b697a377d7ULL, + 0xd60abfdbc3cbd6d0ULL, 0x6524f365c06c89bfULL, 0x228e898c6b8b768bULL, 0x91a0c532682c29e4ULL, + 0x5a7bfb56c35a3485ULL, 0xe955b7e8c0fd6beaULL, 0xaeffcd016b1a94deULL, 0x1dd181bf68bdcbb1ULL, + 0x21ab38d23cd56ab6ULL, 0x9285746c3f7235d9ULL, 0xd52f0e859495caedULL, 0x6601423b97329582ULL, + 0xd041dd676d77eeaaULL, 0x636f91d96ed0b1c5ULL, 0x24c5eb30c5374ef1ULL, 0x97eba78ec690119eULL, + 0xab911ee392f8b099ULL, 0x18bf525d915feff6ULL, 0x5f1528b43ab810c2ULL, 0xec3b640a391f4fadULL, + 0x27e05a6e926952ccULL, 0x94ce16d091ce0da3ULL, 0xd3646c393a29f297ULL, 0x604a2087398eadf8ULL, + 0x5c3099ea6de60cffULL, 0xef1ed5546e415390ULL, 0xa8b4afbdc5a6aca4ULL, 0x1b9ae303c601f3cbULL, + 0x56ed3e2f9e224471ULL, 0xe5c372919d851b1eULL, 0xa26908783662e42aULL, 0x114744c635c5bb45ULL, + 0x2d3dfdab61ad1a42ULL, 0x9e13b115620a452dULL, 0xd9b9cbfcc9edba19ULL, 0x6a978742ca4ae576ULL, + 0xa14cb926613cf817ULL, 0x1262f598629ba778ULL, 0x55c88f71c97c584cULL, 0xe6e6c3cfcadb0723ULL, + 0xda9c7aa29eb3a624ULL, 0x69b2361c9d14f94bULL, 0x2e184cf536f3067fULL, 0x9d36004b35545910ULL, + 0x2b769f17cf112238ULL, 0x9858d3a9ccb67d57ULL, 0xdff2a94067518263ULL, 0x6cdce5fe64f6dd0cULL, + 0x50a65c93309e7c0bULL, 0xe388102d33392364ULL, 0xa4226ac498dedc50ULL, 0x170c267a9b79833fULL, + 0xdcd7181e300f9e5eULL, 0x6ff954a033a8c131ULL, 0x28532e49984f3e05ULL, 0x9b7d62f79be8616aULL, + 0xa707db9acf80c06dULL, 0x14299724cc279f02ULL, 0x5383edcd67c06036ULL, 0xe0ada17364673f59ULL }; static const uint64_t crc64_ecma_norm_table[256] = { - 0x0000000000000000ULL, 0x42f0e1eba9ea3693ULL, - 0x85e1c3d753d46d26ULL, 0xc711223cfa3e5bb5ULL, - 0x493366450e42ecdfULL, 0x0bc387aea7a8da4cULL, - 0xccd2a5925d9681f9ULL, 0x8e224479f47cb76aULL, - 0x9266cc8a1c85d9beULL, 0xd0962d61b56fef2dULL, - 0x17870f5d4f51b498ULL, 0x5577eeb6e6bb820bULL, - 0xdb55aacf12c73561ULL, 0x99a54b24bb2d03f2ULL, - 0x5eb4691841135847ULL, 0x1c4488f3e8f96ed4ULL, - 0x663d78ff90e185efULL, 0x24cd9914390bb37cULL, - 0xe3dcbb28c335e8c9ULL, 0xa12c5ac36adfde5aULL, - 0x2f0e1eba9ea36930ULL, 0x6dfeff5137495fa3ULL, - 0xaaefdd6dcd770416ULL, 0xe81f3c86649d3285ULL, - 0xf45bb4758c645c51ULL, 0xb6ab559e258e6ac2ULL, - 0x71ba77a2dfb03177ULL, 0x334a9649765a07e4ULL, - 0xbd68d2308226b08eULL, 0xff9833db2bcc861dULL, - 0x388911e7d1f2dda8ULL, 0x7a79f00c7818eb3bULL, - 0xcc7af1ff21c30bdeULL, 0x8e8a101488293d4dULL, - 0x499b3228721766f8ULL, 0x0b6bd3c3dbfd506bULL, - 0x854997ba2f81e701ULL, 0xc7b97651866bd192ULL, - 0x00a8546d7c558a27ULL, 0x4258b586d5bfbcb4ULL, - 0x5e1c3d753d46d260ULL, 0x1cecdc9e94ace4f3ULL, - 0xdbfdfea26e92bf46ULL, 0x990d1f49c77889d5ULL, - 0x172f5b3033043ebfULL, 0x55dfbadb9aee082cULL, - 0x92ce98e760d05399ULL, 0xd03e790cc93a650aULL, - 0xaa478900b1228e31ULL, 0xe8b768eb18c8b8a2ULL, - 0x2fa64ad7e2f6e317ULL, 0x6d56ab3c4b1cd584ULL, - 0xe374ef45bf6062eeULL, 0xa1840eae168a547dULL, - 0x66952c92ecb40fc8ULL, 0x2465cd79455e395bULL, - 0x3821458aada7578fULL, 0x7ad1a461044d611cULL, - 0xbdc0865dfe733aa9ULL, 0xff3067b657990c3aULL, - 0x711223cfa3e5bb50ULL, 0x33e2c2240a0f8dc3ULL, - 0xf4f3e018f031d676ULL, 0xb60301f359dbe0e5ULL, - 0xda050215ea6c212fULL, 0x98f5e3fe438617bcULL, - 0x5fe4c1c2b9b84c09ULL, 0x1d14202910527a9aULL, - 0x93366450e42ecdf0ULL, 0xd1c685bb4dc4fb63ULL, - 0x16d7a787b7faa0d6ULL, 0x5427466c1e109645ULL, - 0x4863ce9ff6e9f891ULL, 0x0a932f745f03ce02ULL, - 0xcd820d48a53d95b7ULL, 0x8f72eca30cd7a324ULL, - 0x0150a8daf8ab144eULL, 0x43a04931514122ddULL, - 0x84b16b0dab7f7968ULL, 0xc6418ae602954ffbULL, - 0xbc387aea7a8da4c0ULL, 0xfec89b01d3679253ULL, - 0x39d9b93d2959c9e6ULL, 0x7b2958d680b3ff75ULL, - 0xf50b1caf74cf481fULL, 0xb7fbfd44dd257e8cULL, - 0x70eadf78271b2539ULL, 0x321a3e938ef113aaULL, - 0x2e5eb66066087d7eULL, 0x6cae578bcfe24bedULL, - 0xabbf75b735dc1058ULL, 0xe94f945c9c3626cbULL, - 0x676dd025684a91a1ULL, 0x259d31cec1a0a732ULL, - 0xe28c13f23b9efc87ULL, 0xa07cf2199274ca14ULL, - 0x167ff3eacbaf2af1ULL, 0x548f120162451c62ULL, - 0x939e303d987b47d7ULL, 0xd16ed1d631917144ULL, - 0x5f4c95afc5edc62eULL, 0x1dbc74446c07f0bdULL, - 0xdaad56789639ab08ULL, 0x985db7933fd39d9bULL, - 0x84193f60d72af34fULL, 0xc6e9de8b7ec0c5dcULL, - 0x01f8fcb784fe9e69ULL, 0x43081d5c2d14a8faULL, - 0xcd2a5925d9681f90ULL, 0x8fdab8ce70822903ULL, - 0x48cb9af28abc72b6ULL, 0x0a3b7b1923564425ULL, - 0x70428b155b4eaf1eULL, 0x32b26afef2a4998dULL, - 0xf5a348c2089ac238ULL, 0xb753a929a170f4abULL, - 0x3971ed50550c43c1ULL, 0x7b810cbbfce67552ULL, - 0xbc902e8706d82ee7ULL, 0xfe60cf6caf321874ULL, - 0xe224479f47cb76a0ULL, 0xa0d4a674ee214033ULL, - 0x67c58448141f1b86ULL, 0x253565a3bdf52d15ULL, - 0xab1721da49899a7fULL, 0xe9e7c031e063acecULL, - 0x2ef6e20d1a5df759ULL, 0x6c0603e6b3b7c1caULL, - 0xf6fae5c07d3274cdULL, 0xb40a042bd4d8425eULL, - 0x731b26172ee619ebULL, 0x31ebc7fc870c2f78ULL, - 0xbfc9838573709812ULL, 0xfd39626eda9aae81ULL, - 0x3a28405220a4f534ULL, 0x78d8a1b9894ec3a7ULL, - 0x649c294a61b7ad73ULL, 0x266cc8a1c85d9be0ULL, - 0xe17dea9d3263c055ULL, 0xa38d0b769b89f6c6ULL, - 0x2daf4f0f6ff541acULL, 0x6f5faee4c61f773fULL, - 0xa84e8cd83c212c8aULL, 0xeabe6d3395cb1a19ULL, - 0x90c79d3fedd3f122ULL, 0xd2377cd44439c7b1ULL, - 0x15265ee8be079c04ULL, 0x57d6bf0317edaa97ULL, - 0xd9f4fb7ae3911dfdULL, 0x9b041a914a7b2b6eULL, - 0x5c1538adb04570dbULL, 0x1ee5d94619af4648ULL, - 0x02a151b5f156289cULL, 0x4051b05e58bc1e0fULL, - 0x87409262a28245baULL, 0xc5b073890b687329ULL, - 0x4b9237f0ff14c443ULL, 0x0962d61b56fef2d0ULL, - 0xce73f427acc0a965ULL, 0x8c8315cc052a9ff6ULL, - 0x3a80143f5cf17f13ULL, 0x7870f5d4f51b4980ULL, - 0xbf61d7e80f251235ULL, 0xfd913603a6cf24a6ULL, - 0x73b3727a52b393ccULL, 0x31439391fb59a55fULL, - 0xf652b1ad0167feeaULL, 0xb4a25046a88dc879ULL, - 0xa8e6d8b54074a6adULL, 0xea16395ee99e903eULL, - 0x2d071b6213a0cb8bULL, 0x6ff7fa89ba4afd18ULL, - 0xe1d5bef04e364a72ULL, 0xa3255f1be7dc7ce1ULL, - 0x64347d271de22754ULL, 0x26c49cccb40811c7ULL, - 0x5cbd6cc0cc10fafcULL, 0x1e4d8d2b65facc6fULL, - 0xd95caf179fc497daULL, 0x9bac4efc362ea149ULL, - 0x158e0a85c2521623ULL, 0x577eeb6e6bb820b0ULL, - 0x906fc95291867b05ULL, 0xd29f28b9386c4d96ULL, - 0xcedba04ad0952342ULL, 0x8c2b41a1797f15d1ULL, - 0x4b3a639d83414e64ULL, 0x09ca82762aab78f7ULL, - 0x87e8c60fded7cf9dULL, 0xc51827e4773df90eULL, - 0x020905d88d03a2bbULL, 0x40f9e43324e99428ULL, - 0x2cffe7d5975e55e2ULL, 0x6e0f063e3eb46371ULL, - 0xa91e2402c48a38c4ULL, 0xebeec5e96d600e57ULL, - 0x65cc8190991cb93dULL, 0x273c607b30f68faeULL, - 0xe02d4247cac8d41bULL, 0xa2dda3ac6322e288ULL, - 0xbe992b5f8bdb8c5cULL, 0xfc69cab42231bacfULL, - 0x3b78e888d80fe17aULL, 0x7988096371e5d7e9ULL, - 0xf7aa4d1a85996083ULL, 0xb55aacf12c735610ULL, - 0x724b8ecdd64d0da5ULL, 0x30bb6f267fa73b36ULL, - 0x4ac29f2a07bfd00dULL, 0x08327ec1ae55e69eULL, - 0xcf235cfd546bbd2bULL, 0x8dd3bd16fd818bb8ULL, - 0x03f1f96f09fd3cd2ULL, 0x41011884a0170a41ULL, - 0x86103ab85a2951f4ULL, 0xc4e0db53f3c36767ULL, - 0xd8a453a01b3a09b3ULL, 0x9a54b24bb2d03f20ULL, - 0x5d45907748ee6495ULL, 0x1fb5719ce1045206ULL, - 0x919735e51578e56cULL, 0xd367d40ebc92d3ffULL, - 0x1476f63246ac884aULL, 0x568617d9ef46bed9ULL, - 0xe085162ab69d5e3cULL, 0xa275f7c11f7768afULL, - 0x6564d5fde549331aULL, 0x279434164ca30589ULL, - 0xa9b6706fb8dfb2e3ULL, 0xeb46918411358470ULL, - 0x2c57b3b8eb0bdfc5ULL, 0x6ea7525342e1e956ULL, - 0x72e3daa0aa188782ULL, 0x30133b4b03f2b111ULL, - 0xf7021977f9cceaa4ULL, 0xb5f2f89c5026dc37ULL, - 0x3bd0bce5a45a6b5dULL, 0x79205d0e0db05dceULL, - 0xbe317f32f78e067bULL, 0xfcc19ed95e6430e8ULL, - 0x86b86ed5267cdbd3ULL, 0xc4488f3e8f96ed40ULL, - 0x0359ad0275a8b6f5ULL, 0x41a94ce9dc428066ULL, - 0xcf8b0890283e370cULL, 0x8d7be97b81d4019fULL, - 0x4a6acb477bea5a2aULL, 0x089a2aacd2006cb9ULL, - 0x14dea25f3af9026dULL, 0x562e43b4931334feULL, - 0x913f6188692d6f4bULL, 0xd3cf8063c0c759d8ULL, - 0x5dedc41a34bbeeb2ULL, 0x1f1d25f19d51d821ULL, - 0xd80c07cd676f8394ULL, 0x9afce626ce85b507ULL + 0x0000000000000000ULL, 0x42f0e1eba9ea3693ULL, 0x85e1c3d753d46d26ULL, 0xc711223cfa3e5bb5ULL, + 0x493366450e42ecdfULL, 0x0bc387aea7a8da4cULL, 0xccd2a5925d9681f9ULL, 0x8e224479f47cb76aULL, + 0x9266cc8a1c85d9beULL, 0xd0962d61b56fef2dULL, 0x17870f5d4f51b498ULL, 0x5577eeb6e6bb820bULL, + 0xdb55aacf12c73561ULL, 0x99a54b24bb2d03f2ULL, 0x5eb4691841135847ULL, 0x1c4488f3e8f96ed4ULL, + 0x663d78ff90e185efULL, 0x24cd9914390bb37cULL, 0xe3dcbb28c335e8c9ULL, 0xa12c5ac36adfde5aULL, + 0x2f0e1eba9ea36930ULL, 0x6dfeff5137495fa3ULL, 0xaaefdd6dcd770416ULL, 0xe81f3c86649d3285ULL, + 0xf45bb4758c645c51ULL, 0xb6ab559e258e6ac2ULL, 0x71ba77a2dfb03177ULL, 0x334a9649765a07e4ULL, + 0xbd68d2308226b08eULL, 0xff9833db2bcc861dULL, 0x388911e7d1f2dda8ULL, 0x7a79f00c7818eb3bULL, + 0xcc7af1ff21c30bdeULL, 0x8e8a101488293d4dULL, 0x499b3228721766f8ULL, 0x0b6bd3c3dbfd506bULL, + 0x854997ba2f81e701ULL, 0xc7b97651866bd192ULL, 0x00a8546d7c558a27ULL, 0x4258b586d5bfbcb4ULL, + 0x5e1c3d753d46d260ULL, 0x1cecdc9e94ace4f3ULL, 0xdbfdfea26e92bf46ULL, 0x990d1f49c77889d5ULL, + 0x172f5b3033043ebfULL, 0x55dfbadb9aee082cULL, 0x92ce98e760d05399ULL, 0xd03e790cc93a650aULL, + 0xaa478900b1228e31ULL, 0xe8b768eb18c8b8a2ULL, 0x2fa64ad7e2f6e317ULL, 0x6d56ab3c4b1cd584ULL, + 0xe374ef45bf6062eeULL, 0xa1840eae168a547dULL, 0x66952c92ecb40fc8ULL, 0x2465cd79455e395bULL, + 0x3821458aada7578fULL, 0x7ad1a461044d611cULL, 0xbdc0865dfe733aa9ULL, 0xff3067b657990c3aULL, + 0x711223cfa3e5bb50ULL, 0x33e2c2240a0f8dc3ULL, 0xf4f3e018f031d676ULL, 0xb60301f359dbe0e5ULL, + 0xda050215ea6c212fULL, 0x98f5e3fe438617bcULL, 0x5fe4c1c2b9b84c09ULL, 0x1d14202910527a9aULL, + 0x93366450e42ecdf0ULL, 0xd1c685bb4dc4fb63ULL, 0x16d7a787b7faa0d6ULL, 0x5427466c1e109645ULL, + 0x4863ce9ff6e9f891ULL, 0x0a932f745f03ce02ULL, 0xcd820d48a53d95b7ULL, 0x8f72eca30cd7a324ULL, + 0x0150a8daf8ab144eULL, 0x43a04931514122ddULL, 0x84b16b0dab7f7968ULL, 0xc6418ae602954ffbULL, + 0xbc387aea7a8da4c0ULL, 0xfec89b01d3679253ULL, 0x39d9b93d2959c9e6ULL, 0x7b2958d680b3ff75ULL, + 0xf50b1caf74cf481fULL, 0xb7fbfd44dd257e8cULL, 0x70eadf78271b2539ULL, 0x321a3e938ef113aaULL, + 0x2e5eb66066087d7eULL, 0x6cae578bcfe24bedULL, 0xabbf75b735dc1058ULL, 0xe94f945c9c3626cbULL, + 0x676dd025684a91a1ULL, 0x259d31cec1a0a732ULL, 0xe28c13f23b9efc87ULL, 0xa07cf2199274ca14ULL, + 0x167ff3eacbaf2af1ULL, 0x548f120162451c62ULL, 0x939e303d987b47d7ULL, 0xd16ed1d631917144ULL, + 0x5f4c95afc5edc62eULL, 0x1dbc74446c07f0bdULL, 0xdaad56789639ab08ULL, 0x985db7933fd39d9bULL, + 0x84193f60d72af34fULL, 0xc6e9de8b7ec0c5dcULL, 0x01f8fcb784fe9e69ULL, 0x43081d5c2d14a8faULL, + 0xcd2a5925d9681f90ULL, 0x8fdab8ce70822903ULL, 0x48cb9af28abc72b6ULL, 0x0a3b7b1923564425ULL, + 0x70428b155b4eaf1eULL, 0x32b26afef2a4998dULL, 0xf5a348c2089ac238ULL, 0xb753a929a170f4abULL, + 0x3971ed50550c43c1ULL, 0x7b810cbbfce67552ULL, 0xbc902e8706d82ee7ULL, 0xfe60cf6caf321874ULL, + 0xe224479f47cb76a0ULL, 0xa0d4a674ee214033ULL, 0x67c58448141f1b86ULL, 0x253565a3bdf52d15ULL, + 0xab1721da49899a7fULL, 0xe9e7c031e063acecULL, 0x2ef6e20d1a5df759ULL, 0x6c0603e6b3b7c1caULL, + 0xf6fae5c07d3274cdULL, 0xb40a042bd4d8425eULL, 0x731b26172ee619ebULL, 0x31ebc7fc870c2f78ULL, + 0xbfc9838573709812ULL, 0xfd39626eda9aae81ULL, 0x3a28405220a4f534ULL, 0x78d8a1b9894ec3a7ULL, + 0x649c294a61b7ad73ULL, 0x266cc8a1c85d9be0ULL, 0xe17dea9d3263c055ULL, 0xa38d0b769b89f6c6ULL, + 0x2daf4f0f6ff541acULL, 0x6f5faee4c61f773fULL, 0xa84e8cd83c212c8aULL, 0xeabe6d3395cb1a19ULL, + 0x90c79d3fedd3f122ULL, 0xd2377cd44439c7b1ULL, 0x15265ee8be079c04ULL, 0x57d6bf0317edaa97ULL, + 0xd9f4fb7ae3911dfdULL, 0x9b041a914a7b2b6eULL, 0x5c1538adb04570dbULL, 0x1ee5d94619af4648ULL, + 0x02a151b5f156289cULL, 0x4051b05e58bc1e0fULL, 0x87409262a28245baULL, 0xc5b073890b687329ULL, + 0x4b9237f0ff14c443ULL, 0x0962d61b56fef2d0ULL, 0xce73f427acc0a965ULL, 0x8c8315cc052a9ff6ULL, + 0x3a80143f5cf17f13ULL, 0x7870f5d4f51b4980ULL, 0xbf61d7e80f251235ULL, 0xfd913603a6cf24a6ULL, + 0x73b3727a52b393ccULL, 0x31439391fb59a55fULL, 0xf652b1ad0167feeaULL, 0xb4a25046a88dc879ULL, + 0xa8e6d8b54074a6adULL, 0xea16395ee99e903eULL, 0x2d071b6213a0cb8bULL, 0x6ff7fa89ba4afd18ULL, + 0xe1d5bef04e364a72ULL, 0xa3255f1be7dc7ce1ULL, 0x64347d271de22754ULL, 0x26c49cccb40811c7ULL, + 0x5cbd6cc0cc10fafcULL, 0x1e4d8d2b65facc6fULL, 0xd95caf179fc497daULL, 0x9bac4efc362ea149ULL, + 0x158e0a85c2521623ULL, 0x577eeb6e6bb820b0ULL, 0x906fc95291867b05ULL, 0xd29f28b9386c4d96ULL, + 0xcedba04ad0952342ULL, 0x8c2b41a1797f15d1ULL, 0x4b3a639d83414e64ULL, 0x09ca82762aab78f7ULL, + 0x87e8c60fded7cf9dULL, 0xc51827e4773df90eULL, 0x020905d88d03a2bbULL, 0x40f9e43324e99428ULL, + 0x2cffe7d5975e55e2ULL, 0x6e0f063e3eb46371ULL, 0xa91e2402c48a38c4ULL, 0xebeec5e96d600e57ULL, + 0x65cc8190991cb93dULL, 0x273c607b30f68faeULL, 0xe02d4247cac8d41bULL, 0xa2dda3ac6322e288ULL, + 0xbe992b5f8bdb8c5cULL, 0xfc69cab42231bacfULL, 0x3b78e888d80fe17aULL, 0x7988096371e5d7e9ULL, + 0xf7aa4d1a85996083ULL, 0xb55aacf12c735610ULL, 0x724b8ecdd64d0da5ULL, 0x30bb6f267fa73b36ULL, + 0x4ac29f2a07bfd00dULL, 0x08327ec1ae55e69eULL, 0xcf235cfd546bbd2bULL, 0x8dd3bd16fd818bb8ULL, + 0x03f1f96f09fd3cd2ULL, 0x41011884a0170a41ULL, 0x86103ab85a2951f4ULL, 0xc4e0db53f3c36767ULL, + 0xd8a453a01b3a09b3ULL, 0x9a54b24bb2d03f20ULL, 0x5d45907748ee6495ULL, 0x1fb5719ce1045206ULL, + 0x919735e51578e56cULL, 0xd367d40ebc92d3ffULL, 0x1476f63246ac884aULL, 0x568617d9ef46bed9ULL, + 0xe085162ab69d5e3cULL, 0xa275f7c11f7768afULL, 0x6564d5fde549331aULL, 0x279434164ca30589ULL, + 0xa9b6706fb8dfb2e3ULL, 0xeb46918411358470ULL, 0x2c57b3b8eb0bdfc5ULL, 0x6ea7525342e1e956ULL, + 0x72e3daa0aa188782ULL, 0x30133b4b03f2b111ULL, 0xf7021977f9cceaa4ULL, 0xb5f2f89c5026dc37ULL, + 0x3bd0bce5a45a6b5dULL, 0x79205d0e0db05dceULL, 0xbe317f32f78e067bULL, 0xfcc19ed95e6430e8ULL, + 0x86b86ed5267cdbd3ULL, 0xc4488f3e8f96ed40ULL, 0x0359ad0275a8b6f5ULL, 0x41a94ce9dc428066ULL, + 0xcf8b0890283e370cULL, 0x8d7be97b81d4019fULL, 0x4a6acb477bea5a2aULL, 0x089a2aacd2006cb9ULL, + 0x14dea25f3af9026dULL, 0x562e43b4931334feULL, 0x913f6188692d6f4bULL, 0xd3cf8063c0c759d8ULL, + 0x5dedc41a34bbeeb2ULL, 0x1f1d25f19d51d821ULL, 0xd80c07cd676f8394ULL, 0x9afce626ce85b507ULL }; static const uint64_t crc64_iso_refl_table[256] = { - 0x0000000000000000ULL, 0x01b0000000000000ULL, - 0x0360000000000000ULL, 0x02d0000000000000ULL, - 0x06c0000000000000ULL, 0x0770000000000000ULL, - 0x05a0000000000000ULL, 0x0410000000000000ULL, - 0x0d80000000000000ULL, 0x0c30000000000000ULL, - 0x0ee0000000000000ULL, 0x0f50000000000000ULL, - 0x0b40000000000000ULL, 0x0af0000000000000ULL, - 0x0820000000000000ULL, 0x0990000000000000ULL, - 0x1b00000000000000ULL, 0x1ab0000000000000ULL, - 0x1860000000000000ULL, 0x19d0000000000000ULL, - 0x1dc0000000000000ULL, 0x1c70000000000000ULL, - 0x1ea0000000000000ULL, 0x1f10000000000000ULL, - 0x1680000000000000ULL, 0x1730000000000000ULL, - 0x15e0000000000000ULL, 0x1450000000000000ULL, - 0x1040000000000000ULL, 0x11f0000000000000ULL, - 0x1320000000000000ULL, 0x1290000000000000ULL, - 0x3600000000000000ULL, 0x37b0000000000000ULL, - 0x3560000000000000ULL, 0x34d0000000000000ULL, - 0x30c0000000000000ULL, 0x3170000000000000ULL, - 0x33a0000000000000ULL, 0x3210000000000000ULL, - 0x3b80000000000000ULL, 0x3a30000000000000ULL, - 0x38e0000000000000ULL, 0x3950000000000000ULL, - 0x3d40000000000000ULL, 0x3cf0000000000000ULL, - 0x3e20000000000000ULL, 0x3f90000000000000ULL, - 0x2d00000000000000ULL, 0x2cb0000000000000ULL, - 0x2e60000000000000ULL, 0x2fd0000000000000ULL, - 0x2bc0000000000000ULL, 0x2a70000000000000ULL, - 0x28a0000000000000ULL, 0x2910000000000000ULL, - 0x2080000000000000ULL, 0x2130000000000000ULL, - 0x23e0000000000000ULL, 0x2250000000000000ULL, - 0x2640000000000000ULL, 0x27f0000000000000ULL, - 0x2520000000000000ULL, 0x2490000000000000ULL, - 0x6c00000000000000ULL, 0x6db0000000000000ULL, - 0x6f60000000000000ULL, 0x6ed0000000000000ULL, - 0x6ac0000000000000ULL, 0x6b70000000000000ULL, - 0x69a0000000000000ULL, 0x6810000000000000ULL, - 0x6180000000000000ULL, 0x6030000000000000ULL, - 0x62e0000000000000ULL, 0x6350000000000000ULL, - 0x6740000000000000ULL, 0x66f0000000000000ULL, - 0x6420000000000000ULL, 0x6590000000000000ULL, - 0x7700000000000000ULL, 0x76b0000000000000ULL, - 0x7460000000000000ULL, 0x75d0000000000000ULL, - 0x71c0000000000000ULL, 0x7070000000000000ULL, - 0x72a0000000000000ULL, 0x7310000000000000ULL, - 0x7a80000000000000ULL, 0x7b30000000000000ULL, - 0x79e0000000000000ULL, 0x7850000000000000ULL, - 0x7c40000000000000ULL, 0x7df0000000000000ULL, - 0x7f20000000000000ULL, 0x7e90000000000000ULL, - 0x5a00000000000000ULL, 0x5bb0000000000000ULL, - 0x5960000000000000ULL, 0x58d0000000000000ULL, - 0x5cc0000000000000ULL, 0x5d70000000000000ULL, - 0x5fa0000000000000ULL, 0x5e10000000000000ULL, - 0x5780000000000000ULL, 0x5630000000000000ULL, - 0x54e0000000000000ULL, 0x5550000000000000ULL, - 0x5140000000000000ULL, 0x50f0000000000000ULL, - 0x5220000000000000ULL, 0x5390000000000000ULL, - 0x4100000000000000ULL, 0x40b0000000000000ULL, - 0x4260000000000000ULL, 0x43d0000000000000ULL, - 0x47c0000000000000ULL, 0x4670000000000000ULL, - 0x44a0000000000000ULL, 0x4510000000000000ULL, - 0x4c80000000000000ULL, 0x4d30000000000000ULL, - 0x4fe0000000000000ULL, 0x4e50000000000000ULL, - 0x4a40000000000000ULL, 0x4bf0000000000000ULL, - 0x4920000000000000ULL, 0x4890000000000000ULL, - 0xd800000000000000ULL, 0xd9b0000000000000ULL, - 0xdb60000000000000ULL, 0xdad0000000000000ULL, - 0xdec0000000000000ULL, 0xdf70000000000000ULL, - 0xdda0000000000000ULL, 0xdc10000000000000ULL, - 0xd580000000000000ULL, 0xd430000000000000ULL, - 0xd6e0000000000000ULL, 0xd750000000000000ULL, - 0xd340000000000000ULL, 0xd2f0000000000000ULL, - 0xd020000000000000ULL, 0xd190000000000000ULL, - 0xc300000000000000ULL, 0xc2b0000000000000ULL, - 0xc060000000000000ULL, 0xc1d0000000000000ULL, - 0xc5c0000000000000ULL, 0xc470000000000000ULL, - 0xc6a0000000000000ULL, 0xc710000000000000ULL, - 0xce80000000000000ULL, 0xcf30000000000000ULL, - 0xcde0000000000000ULL, 0xcc50000000000000ULL, - 0xc840000000000000ULL, 0xc9f0000000000000ULL, - 0xcb20000000000000ULL, 0xca90000000000000ULL, - 0xee00000000000000ULL, 0xefb0000000000000ULL, - 0xed60000000000000ULL, 0xecd0000000000000ULL, - 0xe8c0000000000000ULL, 0xe970000000000000ULL, - 0xeba0000000000000ULL, 0xea10000000000000ULL, - 0xe380000000000000ULL, 0xe230000000000000ULL, - 0xe0e0000000000000ULL, 0xe150000000000000ULL, - 0xe540000000000000ULL, 0xe4f0000000000000ULL, - 0xe620000000000000ULL, 0xe790000000000000ULL, - 0xf500000000000000ULL, 0xf4b0000000000000ULL, - 0xf660000000000000ULL, 0xf7d0000000000000ULL, - 0xf3c0000000000000ULL, 0xf270000000000000ULL, - 0xf0a0000000000000ULL, 0xf110000000000000ULL, - 0xf880000000000000ULL, 0xf930000000000000ULL, - 0xfbe0000000000000ULL, 0xfa50000000000000ULL, - 0xfe40000000000000ULL, 0xfff0000000000000ULL, - 0xfd20000000000000ULL, 0xfc90000000000000ULL, - 0xb400000000000000ULL, 0xb5b0000000000000ULL, - 0xb760000000000000ULL, 0xb6d0000000000000ULL, - 0xb2c0000000000000ULL, 0xb370000000000000ULL, - 0xb1a0000000000000ULL, 0xb010000000000000ULL, - 0xb980000000000000ULL, 0xb830000000000000ULL, - 0xbae0000000000000ULL, 0xbb50000000000000ULL, - 0xbf40000000000000ULL, 0xbef0000000000000ULL, - 0xbc20000000000000ULL, 0xbd90000000000000ULL, - 0xaf00000000000000ULL, 0xaeb0000000000000ULL, - 0xac60000000000000ULL, 0xadd0000000000000ULL, - 0xa9c0000000000000ULL, 0xa870000000000000ULL, - 0xaaa0000000000000ULL, 0xab10000000000000ULL, - 0xa280000000000000ULL, 0xa330000000000000ULL, - 0xa1e0000000000000ULL, 0xa050000000000000ULL, - 0xa440000000000000ULL, 0xa5f0000000000000ULL, - 0xa720000000000000ULL, 0xa690000000000000ULL, - 0x8200000000000000ULL, 0x83b0000000000000ULL, - 0x8160000000000000ULL, 0x80d0000000000000ULL, - 0x84c0000000000000ULL, 0x8570000000000000ULL, - 0x87a0000000000000ULL, 0x8610000000000000ULL, - 0x8f80000000000000ULL, 0x8e30000000000000ULL, - 0x8ce0000000000000ULL, 0x8d50000000000000ULL, - 0x8940000000000000ULL, 0x88f0000000000000ULL, - 0x8a20000000000000ULL, 0x8b90000000000000ULL, - 0x9900000000000000ULL, 0x98b0000000000000ULL, - 0x9a60000000000000ULL, 0x9bd0000000000000ULL, - 0x9fc0000000000000ULL, 0x9e70000000000000ULL, - 0x9ca0000000000000ULL, 0x9d10000000000000ULL, - 0x9480000000000000ULL, 0x9530000000000000ULL, - 0x97e0000000000000ULL, 0x9650000000000000ULL, - 0x9240000000000000ULL, 0x93f0000000000000ULL, - 0x9120000000000000ULL, 0x9090000000000000ULL + 0x0000000000000000ULL, 0x01b0000000000000ULL, 0x0360000000000000ULL, 0x02d0000000000000ULL, + 0x06c0000000000000ULL, 0x0770000000000000ULL, 0x05a0000000000000ULL, 0x0410000000000000ULL, + 0x0d80000000000000ULL, 0x0c30000000000000ULL, 0x0ee0000000000000ULL, 0x0f50000000000000ULL, + 0x0b40000000000000ULL, 0x0af0000000000000ULL, 0x0820000000000000ULL, 0x0990000000000000ULL, + 0x1b00000000000000ULL, 0x1ab0000000000000ULL, 0x1860000000000000ULL, 0x19d0000000000000ULL, + 0x1dc0000000000000ULL, 0x1c70000000000000ULL, 0x1ea0000000000000ULL, 0x1f10000000000000ULL, + 0x1680000000000000ULL, 0x1730000000000000ULL, 0x15e0000000000000ULL, 0x1450000000000000ULL, + 0x1040000000000000ULL, 0x11f0000000000000ULL, 0x1320000000000000ULL, 0x1290000000000000ULL, + 0x3600000000000000ULL, 0x37b0000000000000ULL, 0x3560000000000000ULL, 0x34d0000000000000ULL, + 0x30c0000000000000ULL, 0x3170000000000000ULL, 0x33a0000000000000ULL, 0x3210000000000000ULL, + 0x3b80000000000000ULL, 0x3a30000000000000ULL, 0x38e0000000000000ULL, 0x3950000000000000ULL, + 0x3d40000000000000ULL, 0x3cf0000000000000ULL, 0x3e20000000000000ULL, 0x3f90000000000000ULL, + 0x2d00000000000000ULL, 0x2cb0000000000000ULL, 0x2e60000000000000ULL, 0x2fd0000000000000ULL, + 0x2bc0000000000000ULL, 0x2a70000000000000ULL, 0x28a0000000000000ULL, 0x2910000000000000ULL, + 0x2080000000000000ULL, 0x2130000000000000ULL, 0x23e0000000000000ULL, 0x2250000000000000ULL, + 0x2640000000000000ULL, 0x27f0000000000000ULL, 0x2520000000000000ULL, 0x2490000000000000ULL, + 0x6c00000000000000ULL, 0x6db0000000000000ULL, 0x6f60000000000000ULL, 0x6ed0000000000000ULL, + 0x6ac0000000000000ULL, 0x6b70000000000000ULL, 0x69a0000000000000ULL, 0x6810000000000000ULL, + 0x6180000000000000ULL, 0x6030000000000000ULL, 0x62e0000000000000ULL, 0x6350000000000000ULL, + 0x6740000000000000ULL, 0x66f0000000000000ULL, 0x6420000000000000ULL, 0x6590000000000000ULL, + 0x7700000000000000ULL, 0x76b0000000000000ULL, 0x7460000000000000ULL, 0x75d0000000000000ULL, + 0x71c0000000000000ULL, 0x7070000000000000ULL, 0x72a0000000000000ULL, 0x7310000000000000ULL, + 0x7a80000000000000ULL, 0x7b30000000000000ULL, 0x79e0000000000000ULL, 0x7850000000000000ULL, + 0x7c40000000000000ULL, 0x7df0000000000000ULL, 0x7f20000000000000ULL, 0x7e90000000000000ULL, + 0x5a00000000000000ULL, 0x5bb0000000000000ULL, 0x5960000000000000ULL, 0x58d0000000000000ULL, + 0x5cc0000000000000ULL, 0x5d70000000000000ULL, 0x5fa0000000000000ULL, 0x5e10000000000000ULL, + 0x5780000000000000ULL, 0x5630000000000000ULL, 0x54e0000000000000ULL, 0x5550000000000000ULL, + 0x5140000000000000ULL, 0x50f0000000000000ULL, 0x5220000000000000ULL, 0x5390000000000000ULL, + 0x4100000000000000ULL, 0x40b0000000000000ULL, 0x4260000000000000ULL, 0x43d0000000000000ULL, + 0x47c0000000000000ULL, 0x4670000000000000ULL, 0x44a0000000000000ULL, 0x4510000000000000ULL, + 0x4c80000000000000ULL, 0x4d30000000000000ULL, 0x4fe0000000000000ULL, 0x4e50000000000000ULL, + 0x4a40000000000000ULL, 0x4bf0000000000000ULL, 0x4920000000000000ULL, 0x4890000000000000ULL, + 0xd800000000000000ULL, 0xd9b0000000000000ULL, 0xdb60000000000000ULL, 0xdad0000000000000ULL, + 0xdec0000000000000ULL, 0xdf70000000000000ULL, 0xdda0000000000000ULL, 0xdc10000000000000ULL, + 0xd580000000000000ULL, 0xd430000000000000ULL, 0xd6e0000000000000ULL, 0xd750000000000000ULL, + 0xd340000000000000ULL, 0xd2f0000000000000ULL, 0xd020000000000000ULL, 0xd190000000000000ULL, + 0xc300000000000000ULL, 0xc2b0000000000000ULL, 0xc060000000000000ULL, 0xc1d0000000000000ULL, + 0xc5c0000000000000ULL, 0xc470000000000000ULL, 0xc6a0000000000000ULL, 0xc710000000000000ULL, + 0xce80000000000000ULL, 0xcf30000000000000ULL, 0xcde0000000000000ULL, 0xcc50000000000000ULL, + 0xc840000000000000ULL, 0xc9f0000000000000ULL, 0xcb20000000000000ULL, 0xca90000000000000ULL, + 0xee00000000000000ULL, 0xefb0000000000000ULL, 0xed60000000000000ULL, 0xecd0000000000000ULL, + 0xe8c0000000000000ULL, 0xe970000000000000ULL, 0xeba0000000000000ULL, 0xea10000000000000ULL, + 0xe380000000000000ULL, 0xe230000000000000ULL, 0xe0e0000000000000ULL, 0xe150000000000000ULL, + 0xe540000000000000ULL, 0xe4f0000000000000ULL, 0xe620000000000000ULL, 0xe790000000000000ULL, + 0xf500000000000000ULL, 0xf4b0000000000000ULL, 0xf660000000000000ULL, 0xf7d0000000000000ULL, + 0xf3c0000000000000ULL, 0xf270000000000000ULL, 0xf0a0000000000000ULL, 0xf110000000000000ULL, + 0xf880000000000000ULL, 0xf930000000000000ULL, 0xfbe0000000000000ULL, 0xfa50000000000000ULL, + 0xfe40000000000000ULL, 0xfff0000000000000ULL, 0xfd20000000000000ULL, 0xfc90000000000000ULL, + 0xb400000000000000ULL, 0xb5b0000000000000ULL, 0xb760000000000000ULL, 0xb6d0000000000000ULL, + 0xb2c0000000000000ULL, 0xb370000000000000ULL, 0xb1a0000000000000ULL, 0xb010000000000000ULL, + 0xb980000000000000ULL, 0xb830000000000000ULL, 0xbae0000000000000ULL, 0xbb50000000000000ULL, + 0xbf40000000000000ULL, 0xbef0000000000000ULL, 0xbc20000000000000ULL, 0xbd90000000000000ULL, + 0xaf00000000000000ULL, 0xaeb0000000000000ULL, 0xac60000000000000ULL, 0xadd0000000000000ULL, + 0xa9c0000000000000ULL, 0xa870000000000000ULL, 0xaaa0000000000000ULL, 0xab10000000000000ULL, + 0xa280000000000000ULL, 0xa330000000000000ULL, 0xa1e0000000000000ULL, 0xa050000000000000ULL, + 0xa440000000000000ULL, 0xa5f0000000000000ULL, 0xa720000000000000ULL, 0xa690000000000000ULL, + 0x8200000000000000ULL, 0x83b0000000000000ULL, 0x8160000000000000ULL, 0x80d0000000000000ULL, + 0x84c0000000000000ULL, 0x8570000000000000ULL, 0x87a0000000000000ULL, 0x8610000000000000ULL, + 0x8f80000000000000ULL, 0x8e30000000000000ULL, 0x8ce0000000000000ULL, 0x8d50000000000000ULL, + 0x8940000000000000ULL, 0x88f0000000000000ULL, 0x8a20000000000000ULL, 0x8b90000000000000ULL, + 0x9900000000000000ULL, 0x98b0000000000000ULL, 0x9a60000000000000ULL, 0x9bd0000000000000ULL, + 0x9fc0000000000000ULL, 0x9e70000000000000ULL, 0x9ca0000000000000ULL, 0x9d10000000000000ULL, + 0x9480000000000000ULL, 0x9530000000000000ULL, 0x97e0000000000000ULL, 0x9650000000000000ULL, + 0x9240000000000000ULL, 0x93f0000000000000ULL, 0x9120000000000000ULL, 0x9090000000000000ULL }; static const uint64_t crc64_iso_norm_table[256] = { - 0x0000000000000000ULL, 0x000000000000001bULL, - 0x0000000000000036ULL, 0x000000000000002dULL, - 0x000000000000006cULL, 0x0000000000000077ULL, - 0x000000000000005aULL, 0x0000000000000041ULL, - 0x00000000000000d8ULL, 0x00000000000000c3ULL, - 0x00000000000000eeULL, 0x00000000000000f5ULL, - 0x00000000000000b4ULL, 0x00000000000000afULL, - 0x0000000000000082ULL, 0x0000000000000099ULL, - 0x00000000000001b0ULL, 0x00000000000001abULL, - 0x0000000000000186ULL, 0x000000000000019dULL, - 0x00000000000001dcULL, 0x00000000000001c7ULL, - 0x00000000000001eaULL, 0x00000000000001f1ULL, - 0x0000000000000168ULL, 0x0000000000000173ULL, - 0x000000000000015eULL, 0x0000000000000145ULL, - 0x0000000000000104ULL, 0x000000000000011fULL, - 0x0000000000000132ULL, 0x0000000000000129ULL, - 0x0000000000000360ULL, 0x000000000000037bULL, - 0x0000000000000356ULL, 0x000000000000034dULL, - 0x000000000000030cULL, 0x0000000000000317ULL, - 0x000000000000033aULL, 0x0000000000000321ULL, - 0x00000000000003b8ULL, 0x00000000000003a3ULL, - 0x000000000000038eULL, 0x0000000000000395ULL, - 0x00000000000003d4ULL, 0x00000000000003cfULL, - 0x00000000000003e2ULL, 0x00000000000003f9ULL, - 0x00000000000002d0ULL, 0x00000000000002cbULL, - 0x00000000000002e6ULL, 0x00000000000002fdULL, - 0x00000000000002bcULL, 0x00000000000002a7ULL, - 0x000000000000028aULL, 0x0000000000000291ULL, - 0x0000000000000208ULL, 0x0000000000000213ULL, - 0x000000000000023eULL, 0x0000000000000225ULL, - 0x0000000000000264ULL, 0x000000000000027fULL, - 0x0000000000000252ULL, 0x0000000000000249ULL, - 0x00000000000006c0ULL, 0x00000000000006dbULL, - 0x00000000000006f6ULL, 0x00000000000006edULL, - 0x00000000000006acULL, 0x00000000000006b7ULL, - 0x000000000000069aULL, 0x0000000000000681ULL, - 0x0000000000000618ULL, 0x0000000000000603ULL, - 0x000000000000062eULL, 0x0000000000000635ULL, - 0x0000000000000674ULL, 0x000000000000066fULL, - 0x0000000000000642ULL, 0x0000000000000659ULL, - 0x0000000000000770ULL, 0x000000000000076bULL, - 0x0000000000000746ULL, 0x000000000000075dULL, - 0x000000000000071cULL, 0x0000000000000707ULL, - 0x000000000000072aULL, 0x0000000000000731ULL, - 0x00000000000007a8ULL, 0x00000000000007b3ULL, - 0x000000000000079eULL, 0x0000000000000785ULL, - 0x00000000000007c4ULL, 0x00000000000007dfULL, - 0x00000000000007f2ULL, 0x00000000000007e9ULL, - 0x00000000000005a0ULL, 0x00000000000005bbULL, - 0x0000000000000596ULL, 0x000000000000058dULL, - 0x00000000000005ccULL, 0x00000000000005d7ULL, - 0x00000000000005faULL, 0x00000000000005e1ULL, - 0x0000000000000578ULL, 0x0000000000000563ULL, - 0x000000000000054eULL, 0x0000000000000555ULL, - 0x0000000000000514ULL, 0x000000000000050fULL, - 0x0000000000000522ULL, 0x0000000000000539ULL, - 0x0000000000000410ULL, 0x000000000000040bULL, - 0x0000000000000426ULL, 0x000000000000043dULL, - 0x000000000000047cULL, 0x0000000000000467ULL, - 0x000000000000044aULL, 0x0000000000000451ULL, - 0x00000000000004c8ULL, 0x00000000000004d3ULL, - 0x00000000000004feULL, 0x00000000000004e5ULL, - 0x00000000000004a4ULL, 0x00000000000004bfULL, - 0x0000000000000492ULL, 0x0000000000000489ULL, - 0x0000000000000d80ULL, 0x0000000000000d9bULL, - 0x0000000000000db6ULL, 0x0000000000000dadULL, - 0x0000000000000decULL, 0x0000000000000df7ULL, - 0x0000000000000ddaULL, 0x0000000000000dc1ULL, - 0x0000000000000d58ULL, 0x0000000000000d43ULL, - 0x0000000000000d6eULL, 0x0000000000000d75ULL, - 0x0000000000000d34ULL, 0x0000000000000d2fULL, - 0x0000000000000d02ULL, 0x0000000000000d19ULL, - 0x0000000000000c30ULL, 0x0000000000000c2bULL, - 0x0000000000000c06ULL, 0x0000000000000c1dULL, - 0x0000000000000c5cULL, 0x0000000000000c47ULL, - 0x0000000000000c6aULL, 0x0000000000000c71ULL, - 0x0000000000000ce8ULL, 0x0000000000000cf3ULL, - 0x0000000000000cdeULL, 0x0000000000000cc5ULL, - 0x0000000000000c84ULL, 0x0000000000000c9fULL, - 0x0000000000000cb2ULL, 0x0000000000000ca9ULL, - 0x0000000000000ee0ULL, 0x0000000000000efbULL, - 0x0000000000000ed6ULL, 0x0000000000000ecdULL, - 0x0000000000000e8cULL, 0x0000000000000e97ULL, - 0x0000000000000ebaULL, 0x0000000000000ea1ULL, - 0x0000000000000e38ULL, 0x0000000000000e23ULL, - 0x0000000000000e0eULL, 0x0000000000000e15ULL, - 0x0000000000000e54ULL, 0x0000000000000e4fULL, - 0x0000000000000e62ULL, 0x0000000000000e79ULL, - 0x0000000000000f50ULL, 0x0000000000000f4bULL, - 0x0000000000000f66ULL, 0x0000000000000f7dULL, - 0x0000000000000f3cULL, 0x0000000000000f27ULL, - 0x0000000000000f0aULL, 0x0000000000000f11ULL, - 0x0000000000000f88ULL, 0x0000000000000f93ULL, - 0x0000000000000fbeULL, 0x0000000000000fa5ULL, - 0x0000000000000fe4ULL, 0x0000000000000fffULL, - 0x0000000000000fd2ULL, 0x0000000000000fc9ULL, - 0x0000000000000b40ULL, 0x0000000000000b5bULL, - 0x0000000000000b76ULL, 0x0000000000000b6dULL, - 0x0000000000000b2cULL, 0x0000000000000b37ULL, - 0x0000000000000b1aULL, 0x0000000000000b01ULL, - 0x0000000000000b98ULL, 0x0000000000000b83ULL, - 0x0000000000000baeULL, 0x0000000000000bb5ULL, - 0x0000000000000bf4ULL, 0x0000000000000befULL, - 0x0000000000000bc2ULL, 0x0000000000000bd9ULL, - 0x0000000000000af0ULL, 0x0000000000000aebULL, - 0x0000000000000ac6ULL, 0x0000000000000addULL, - 0x0000000000000a9cULL, 0x0000000000000a87ULL, - 0x0000000000000aaaULL, 0x0000000000000ab1ULL, - 0x0000000000000a28ULL, 0x0000000000000a33ULL, - 0x0000000000000a1eULL, 0x0000000000000a05ULL, - 0x0000000000000a44ULL, 0x0000000000000a5fULL, - 0x0000000000000a72ULL, 0x0000000000000a69ULL, - 0x0000000000000820ULL, 0x000000000000083bULL, - 0x0000000000000816ULL, 0x000000000000080dULL, - 0x000000000000084cULL, 0x0000000000000857ULL, - 0x000000000000087aULL, 0x0000000000000861ULL, - 0x00000000000008f8ULL, 0x00000000000008e3ULL, - 0x00000000000008ceULL, 0x00000000000008d5ULL, - 0x0000000000000894ULL, 0x000000000000088fULL, - 0x00000000000008a2ULL, 0x00000000000008b9ULL, - 0x0000000000000990ULL, 0x000000000000098bULL, - 0x00000000000009a6ULL, 0x00000000000009bdULL, - 0x00000000000009fcULL, 0x00000000000009e7ULL, - 0x00000000000009caULL, 0x00000000000009d1ULL, - 0x0000000000000948ULL, 0x0000000000000953ULL, - 0x000000000000097eULL, 0x0000000000000965ULL, - 0x0000000000000924ULL, 0x000000000000093fULL, - 0x0000000000000912ULL, 0x0000000000000909ULL + 0x0000000000000000ULL, 0x000000000000001bULL, 0x0000000000000036ULL, 0x000000000000002dULL, + 0x000000000000006cULL, 0x0000000000000077ULL, 0x000000000000005aULL, 0x0000000000000041ULL, + 0x00000000000000d8ULL, 0x00000000000000c3ULL, 0x00000000000000eeULL, 0x00000000000000f5ULL, + 0x00000000000000b4ULL, 0x00000000000000afULL, 0x0000000000000082ULL, 0x0000000000000099ULL, + 0x00000000000001b0ULL, 0x00000000000001abULL, 0x0000000000000186ULL, 0x000000000000019dULL, + 0x00000000000001dcULL, 0x00000000000001c7ULL, 0x00000000000001eaULL, 0x00000000000001f1ULL, + 0x0000000000000168ULL, 0x0000000000000173ULL, 0x000000000000015eULL, 0x0000000000000145ULL, + 0x0000000000000104ULL, 0x000000000000011fULL, 0x0000000000000132ULL, 0x0000000000000129ULL, + 0x0000000000000360ULL, 0x000000000000037bULL, 0x0000000000000356ULL, 0x000000000000034dULL, + 0x000000000000030cULL, 0x0000000000000317ULL, 0x000000000000033aULL, 0x0000000000000321ULL, + 0x00000000000003b8ULL, 0x00000000000003a3ULL, 0x000000000000038eULL, 0x0000000000000395ULL, + 0x00000000000003d4ULL, 0x00000000000003cfULL, 0x00000000000003e2ULL, 0x00000000000003f9ULL, + 0x00000000000002d0ULL, 0x00000000000002cbULL, 0x00000000000002e6ULL, 0x00000000000002fdULL, + 0x00000000000002bcULL, 0x00000000000002a7ULL, 0x000000000000028aULL, 0x0000000000000291ULL, + 0x0000000000000208ULL, 0x0000000000000213ULL, 0x000000000000023eULL, 0x0000000000000225ULL, + 0x0000000000000264ULL, 0x000000000000027fULL, 0x0000000000000252ULL, 0x0000000000000249ULL, + 0x00000000000006c0ULL, 0x00000000000006dbULL, 0x00000000000006f6ULL, 0x00000000000006edULL, + 0x00000000000006acULL, 0x00000000000006b7ULL, 0x000000000000069aULL, 0x0000000000000681ULL, + 0x0000000000000618ULL, 0x0000000000000603ULL, 0x000000000000062eULL, 0x0000000000000635ULL, + 0x0000000000000674ULL, 0x000000000000066fULL, 0x0000000000000642ULL, 0x0000000000000659ULL, + 0x0000000000000770ULL, 0x000000000000076bULL, 0x0000000000000746ULL, 0x000000000000075dULL, + 0x000000000000071cULL, 0x0000000000000707ULL, 0x000000000000072aULL, 0x0000000000000731ULL, + 0x00000000000007a8ULL, 0x00000000000007b3ULL, 0x000000000000079eULL, 0x0000000000000785ULL, + 0x00000000000007c4ULL, 0x00000000000007dfULL, 0x00000000000007f2ULL, 0x00000000000007e9ULL, + 0x00000000000005a0ULL, 0x00000000000005bbULL, 0x0000000000000596ULL, 0x000000000000058dULL, + 0x00000000000005ccULL, 0x00000000000005d7ULL, 0x00000000000005faULL, 0x00000000000005e1ULL, + 0x0000000000000578ULL, 0x0000000000000563ULL, 0x000000000000054eULL, 0x0000000000000555ULL, + 0x0000000000000514ULL, 0x000000000000050fULL, 0x0000000000000522ULL, 0x0000000000000539ULL, + 0x0000000000000410ULL, 0x000000000000040bULL, 0x0000000000000426ULL, 0x000000000000043dULL, + 0x000000000000047cULL, 0x0000000000000467ULL, 0x000000000000044aULL, 0x0000000000000451ULL, + 0x00000000000004c8ULL, 0x00000000000004d3ULL, 0x00000000000004feULL, 0x00000000000004e5ULL, + 0x00000000000004a4ULL, 0x00000000000004bfULL, 0x0000000000000492ULL, 0x0000000000000489ULL, + 0x0000000000000d80ULL, 0x0000000000000d9bULL, 0x0000000000000db6ULL, 0x0000000000000dadULL, + 0x0000000000000decULL, 0x0000000000000df7ULL, 0x0000000000000ddaULL, 0x0000000000000dc1ULL, + 0x0000000000000d58ULL, 0x0000000000000d43ULL, 0x0000000000000d6eULL, 0x0000000000000d75ULL, + 0x0000000000000d34ULL, 0x0000000000000d2fULL, 0x0000000000000d02ULL, 0x0000000000000d19ULL, + 0x0000000000000c30ULL, 0x0000000000000c2bULL, 0x0000000000000c06ULL, 0x0000000000000c1dULL, + 0x0000000000000c5cULL, 0x0000000000000c47ULL, 0x0000000000000c6aULL, 0x0000000000000c71ULL, + 0x0000000000000ce8ULL, 0x0000000000000cf3ULL, 0x0000000000000cdeULL, 0x0000000000000cc5ULL, + 0x0000000000000c84ULL, 0x0000000000000c9fULL, 0x0000000000000cb2ULL, 0x0000000000000ca9ULL, + 0x0000000000000ee0ULL, 0x0000000000000efbULL, 0x0000000000000ed6ULL, 0x0000000000000ecdULL, + 0x0000000000000e8cULL, 0x0000000000000e97ULL, 0x0000000000000ebaULL, 0x0000000000000ea1ULL, + 0x0000000000000e38ULL, 0x0000000000000e23ULL, 0x0000000000000e0eULL, 0x0000000000000e15ULL, + 0x0000000000000e54ULL, 0x0000000000000e4fULL, 0x0000000000000e62ULL, 0x0000000000000e79ULL, + 0x0000000000000f50ULL, 0x0000000000000f4bULL, 0x0000000000000f66ULL, 0x0000000000000f7dULL, + 0x0000000000000f3cULL, 0x0000000000000f27ULL, 0x0000000000000f0aULL, 0x0000000000000f11ULL, + 0x0000000000000f88ULL, 0x0000000000000f93ULL, 0x0000000000000fbeULL, 0x0000000000000fa5ULL, + 0x0000000000000fe4ULL, 0x0000000000000fffULL, 0x0000000000000fd2ULL, 0x0000000000000fc9ULL, + 0x0000000000000b40ULL, 0x0000000000000b5bULL, 0x0000000000000b76ULL, 0x0000000000000b6dULL, + 0x0000000000000b2cULL, 0x0000000000000b37ULL, 0x0000000000000b1aULL, 0x0000000000000b01ULL, + 0x0000000000000b98ULL, 0x0000000000000b83ULL, 0x0000000000000baeULL, 0x0000000000000bb5ULL, + 0x0000000000000bf4ULL, 0x0000000000000befULL, 0x0000000000000bc2ULL, 0x0000000000000bd9ULL, + 0x0000000000000af0ULL, 0x0000000000000aebULL, 0x0000000000000ac6ULL, 0x0000000000000addULL, + 0x0000000000000a9cULL, 0x0000000000000a87ULL, 0x0000000000000aaaULL, 0x0000000000000ab1ULL, + 0x0000000000000a28ULL, 0x0000000000000a33ULL, 0x0000000000000a1eULL, 0x0000000000000a05ULL, + 0x0000000000000a44ULL, 0x0000000000000a5fULL, 0x0000000000000a72ULL, 0x0000000000000a69ULL, + 0x0000000000000820ULL, 0x000000000000083bULL, 0x0000000000000816ULL, 0x000000000000080dULL, + 0x000000000000084cULL, 0x0000000000000857ULL, 0x000000000000087aULL, 0x0000000000000861ULL, + 0x00000000000008f8ULL, 0x00000000000008e3ULL, 0x00000000000008ceULL, 0x00000000000008d5ULL, + 0x0000000000000894ULL, 0x000000000000088fULL, 0x00000000000008a2ULL, 0x00000000000008b9ULL, + 0x0000000000000990ULL, 0x000000000000098bULL, 0x00000000000009a6ULL, 0x00000000000009bdULL, + 0x00000000000009fcULL, 0x00000000000009e7ULL, 0x00000000000009caULL, 0x00000000000009d1ULL, + 0x0000000000000948ULL, 0x0000000000000953ULL, 0x000000000000097eULL, 0x0000000000000965ULL, + 0x0000000000000924ULL, 0x000000000000093fULL, 0x0000000000000912ULL, 0x0000000000000909ULL }; static const uint64_t crc64_jones_refl_table[256] = { - 0x0000000000000000ULL, 0x7ad870c830358979ULL, - 0xf5b0e190606b12f2ULL, 0x8f689158505e9b8bULL, - 0xc038e5739841b68fULL, 0xbae095bba8743ff6ULL, - 0x358804e3f82aa47dULL, 0x4f50742bc81f2d04ULL, - 0xab28ecb46814fe75ULL, 0xd1f09c7c5821770cULL, - 0x5e980d24087fec87ULL, 0x24407dec384a65feULL, - 0x6b1009c7f05548faULL, 0x11c8790fc060c183ULL, - 0x9ea0e857903e5a08ULL, 0xe478989fa00bd371ULL, - 0x7d08ff3b88be6f81ULL, 0x07d08ff3b88be6f8ULL, - 0x88b81eabe8d57d73ULL, 0xf2606e63d8e0f40aULL, - 0xbd301a4810ffd90eULL, 0xc7e86a8020ca5077ULL, - 0x4880fbd87094cbfcULL, 0x32588b1040a14285ULL, - 0xd620138fe0aa91f4ULL, 0xacf86347d09f188dULL, - 0x2390f21f80c18306ULL, 0x594882d7b0f40a7fULL, - 0x1618f6fc78eb277bULL, 0x6cc0863448deae02ULL, - 0xe3a8176c18803589ULL, 0x997067a428b5bcf0ULL, - 0xfa11fe77117cdf02ULL, 0x80c98ebf2149567bULL, - 0x0fa11fe77117cdf0ULL, 0x75796f2f41224489ULL, - 0x3a291b04893d698dULL, 0x40f16bccb908e0f4ULL, - 0xcf99fa94e9567b7fULL, 0xb5418a5cd963f206ULL, - 0x513912c379682177ULL, 0x2be1620b495da80eULL, - 0xa489f35319033385ULL, 0xde51839b2936bafcULL, - 0x9101f7b0e12997f8ULL, 0xebd98778d11c1e81ULL, - 0x64b116208142850aULL, 0x1e6966e8b1770c73ULL, - 0x8719014c99c2b083ULL, 0xfdc17184a9f739faULL, - 0x72a9e0dcf9a9a271ULL, 0x08719014c99c2b08ULL, - 0x4721e43f0183060cULL, 0x3df994f731b68f75ULL, - 0xb29105af61e814feULL, 0xc849756751dd9d87ULL, - 0x2c31edf8f1d64ef6ULL, 0x56e99d30c1e3c78fULL, - 0xd9810c6891bd5c04ULL, 0xa3597ca0a188d57dULL, - 0xec09088b6997f879ULL, 0x96d1784359a27100ULL, - 0x19b9e91b09fcea8bULL, 0x636199d339c963f2ULL, - 0xdf7adabd7a6e2d6fULL, 0xa5a2aa754a5ba416ULL, - 0x2aca3b2d1a053f9dULL, 0x50124be52a30b6e4ULL, - 0x1f423fcee22f9be0ULL, 0x659a4f06d21a1299ULL, - 0xeaf2de5e82448912ULL, 0x902aae96b271006bULL, - 0x74523609127ad31aULL, 0x0e8a46c1224f5a63ULL, - 0x81e2d7997211c1e8ULL, 0xfb3aa75142244891ULL, - 0xb46ad37a8a3b6595ULL, 0xceb2a3b2ba0eececULL, - 0x41da32eaea507767ULL, 0x3b024222da65fe1eULL, - 0xa2722586f2d042eeULL, 0xd8aa554ec2e5cb97ULL, - 0x57c2c41692bb501cULL, 0x2d1ab4dea28ed965ULL, - 0x624ac0f56a91f461ULL, 0x1892b03d5aa47d18ULL, - 0x97fa21650afae693ULL, 0xed2251ad3acf6feaULL, - 0x095ac9329ac4bc9bULL, 0x7382b9faaaf135e2ULL, - 0xfcea28a2faafae69ULL, 0x8632586aca9a2710ULL, - 0xc9622c4102850a14ULL, 0xb3ba5c8932b0836dULL, - 0x3cd2cdd162ee18e6ULL, 0x460abd1952db919fULL, - 0x256b24ca6b12f26dULL, 0x5fb354025b277b14ULL, - 0xd0dbc55a0b79e09fULL, 0xaa03b5923b4c69e6ULL, - 0xe553c1b9f35344e2ULL, 0x9f8bb171c366cd9bULL, - 0x10e3202993385610ULL, 0x6a3b50e1a30ddf69ULL, - 0x8e43c87e03060c18ULL, 0xf49bb8b633338561ULL, - 0x7bf329ee636d1eeaULL, 0x012b592653589793ULL, - 0x4e7b2d0d9b47ba97ULL, 0x34a35dc5ab7233eeULL, - 0xbbcbcc9dfb2ca865ULL, 0xc113bc55cb19211cULL, - 0x5863dbf1e3ac9decULL, 0x22bbab39d3991495ULL, - 0xadd33a6183c78f1eULL, 0xd70b4aa9b3f20667ULL, - 0x985b3e827bed2b63ULL, 0xe2834e4a4bd8a21aULL, - 0x6debdf121b863991ULL, 0x1733afda2bb3b0e8ULL, - 0xf34b37458bb86399ULL, 0x8993478dbb8deae0ULL, - 0x06fbd6d5ebd3716bULL, 0x7c23a61ddbe6f812ULL, - 0x3373d23613f9d516ULL, 0x49aba2fe23cc5c6fULL, - 0xc6c333a67392c7e4ULL, 0xbc1b436e43a74e9dULL, - 0x95ac9329ac4bc9b5ULL, 0xef74e3e19c7e40ccULL, - 0x601c72b9cc20db47ULL, 0x1ac40271fc15523eULL, - 0x5594765a340a7f3aULL, 0x2f4c0692043ff643ULL, - 0xa02497ca54616dc8ULL, 0xdafce7026454e4b1ULL, - 0x3e847f9dc45f37c0ULL, 0x445c0f55f46abeb9ULL, - 0xcb349e0da4342532ULL, 0xb1eceec59401ac4bULL, - 0xfebc9aee5c1e814fULL, 0x8464ea266c2b0836ULL, - 0x0b0c7b7e3c7593bdULL, 0x71d40bb60c401ac4ULL, - 0xe8a46c1224f5a634ULL, 0x927c1cda14c02f4dULL, - 0x1d148d82449eb4c6ULL, 0x67ccfd4a74ab3dbfULL, - 0x289c8961bcb410bbULL, 0x5244f9a98c8199c2ULL, - 0xdd2c68f1dcdf0249ULL, 0xa7f41839ecea8b30ULL, - 0x438c80a64ce15841ULL, 0x3954f06e7cd4d138ULL, - 0xb63c61362c8a4ab3ULL, 0xcce411fe1cbfc3caULL, - 0x83b465d5d4a0eeceULL, 0xf96c151de49567b7ULL, - 0x76048445b4cbfc3cULL, 0x0cdcf48d84fe7545ULL, - 0x6fbd6d5ebd3716b7ULL, 0x15651d968d029fceULL, - 0x9a0d8ccedd5c0445ULL, 0xe0d5fc06ed698d3cULL, - 0xaf85882d2576a038ULL, 0xd55df8e515432941ULL, - 0x5a3569bd451db2caULL, 0x20ed197575283bb3ULL, - 0xc49581ead523e8c2ULL, 0xbe4df122e51661bbULL, - 0x3125607ab548fa30ULL, 0x4bfd10b2857d7349ULL, - 0x04ad64994d625e4dULL, 0x7e7514517d57d734ULL, - 0xf11d85092d094cbfULL, 0x8bc5f5c11d3cc5c6ULL, - 0x12b5926535897936ULL, 0x686de2ad05bcf04fULL, - 0xe70573f555e26bc4ULL, 0x9ddd033d65d7e2bdULL, - 0xd28d7716adc8cfb9ULL, 0xa85507de9dfd46c0ULL, - 0x273d9686cda3dd4bULL, 0x5de5e64efd965432ULL, - 0xb99d7ed15d9d8743ULL, 0xc3450e196da80e3aULL, - 0x4c2d9f413df695b1ULL, 0x36f5ef890dc31cc8ULL, - 0x79a59ba2c5dc31ccULL, 0x037deb6af5e9b8b5ULL, - 0x8c157a32a5b7233eULL, 0xf6cd0afa9582aa47ULL, - 0x4ad64994d625e4daULL, 0x300e395ce6106da3ULL, - 0xbf66a804b64ef628ULL, 0xc5bed8cc867b7f51ULL, - 0x8aeeace74e645255ULL, 0xf036dc2f7e51db2cULL, - 0x7f5e4d772e0f40a7ULL, 0x05863dbf1e3ac9deULL, - 0xe1fea520be311aafULL, 0x9b26d5e88e0493d6ULL, - 0x144e44b0de5a085dULL, 0x6e963478ee6f8124ULL, - 0x21c640532670ac20ULL, 0x5b1e309b16452559ULL, - 0xd476a1c3461bbed2ULL, 0xaeaed10b762e37abULL, - 0x37deb6af5e9b8b5bULL, 0x4d06c6676eae0222ULL, - 0xc26e573f3ef099a9ULL, 0xb8b627f70ec510d0ULL, - 0xf7e653dcc6da3dd4ULL, 0x8d3e2314f6efb4adULL, - 0x0256b24ca6b12f26ULL, 0x788ec2849684a65fULL, - 0x9cf65a1b368f752eULL, 0xe62e2ad306bafc57ULL, - 0x6946bb8b56e467dcULL, 0x139ecb4366d1eea5ULL, - 0x5ccebf68aecec3a1ULL, 0x2616cfa09efb4ad8ULL, - 0xa97e5ef8cea5d153ULL, 0xd3a62e30fe90582aULL, - 0xb0c7b7e3c7593bd8ULL, 0xca1fc72bf76cb2a1ULL, - 0x45775673a732292aULL, 0x3faf26bb9707a053ULL, - 0x70ff52905f188d57ULL, 0x0a2722586f2d042eULL, - 0x854fb3003f739fa5ULL, 0xff97c3c80f4616dcULL, - 0x1bef5b57af4dc5adULL, 0x61372b9f9f784cd4ULL, - 0xee5fbac7cf26d75fULL, 0x9487ca0fff135e26ULL, - 0xdbd7be24370c7322ULL, 0xa10fceec0739fa5bULL, - 0x2e675fb4576761d0ULL, 0x54bf2f7c6752e8a9ULL, - 0xcdcf48d84fe75459ULL, 0xb71738107fd2dd20ULL, - 0x387fa9482f8c46abULL, 0x42a7d9801fb9cfd2ULL, - 0x0df7adabd7a6e2d6ULL, 0x772fdd63e7936bafULL, - 0xf8474c3bb7cdf024ULL, 0x829f3cf387f8795dULL, - 0x66e7a46c27f3aa2cULL, 0x1c3fd4a417c62355ULL, - 0x935745fc4798b8deULL, 0xe98f353477ad31a7ULL, - 0xa6df411fbfb21ca3ULL, 0xdc0731d78f8795daULL, - 0x536fa08fdfd90e51ULL, 0x29b7d047efec8728ULL + 0x0000000000000000ULL, 0x7ad870c830358979ULL, 0xf5b0e190606b12f2ULL, 0x8f689158505e9b8bULL, + 0xc038e5739841b68fULL, 0xbae095bba8743ff6ULL, 0x358804e3f82aa47dULL, 0x4f50742bc81f2d04ULL, + 0xab28ecb46814fe75ULL, 0xd1f09c7c5821770cULL, 0x5e980d24087fec87ULL, 0x24407dec384a65feULL, + 0x6b1009c7f05548faULL, 0x11c8790fc060c183ULL, 0x9ea0e857903e5a08ULL, 0xe478989fa00bd371ULL, + 0x7d08ff3b88be6f81ULL, 0x07d08ff3b88be6f8ULL, 0x88b81eabe8d57d73ULL, 0xf2606e63d8e0f40aULL, + 0xbd301a4810ffd90eULL, 0xc7e86a8020ca5077ULL, 0x4880fbd87094cbfcULL, 0x32588b1040a14285ULL, + 0xd620138fe0aa91f4ULL, 0xacf86347d09f188dULL, 0x2390f21f80c18306ULL, 0x594882d7b0f40a7fULL, + 0x1618f6fc78eb277bULL, 0x6cc0863448deae02ULL, 0xe3a8176c18803589ULL, 0x997067a428b5bcf0ULL, + 0xfa11fe77117cdf02ULL, 0x80c98ebf2149567bULL, 0x0fa11fe77117cdf0ULL, 0x75796f2f41224489ULL, + 0x3a291b04893d698dULL, 0x40f16bccb908e0f4ULL, 0xcf99fa94e9567b7fULL, 0xb5418a5cd963f206ULL, + 0x513912c379682177ULL, 0x2be1620b495da80eULL, 0xa489f35319033385ULL, 0xde51839b2936bafcULL, + 0x9101f7b0e12997f8ULL, 0xebd98778d11c1e81ULL, 0x64b116208142850aULL, 0x1e6966e8b1770c73ULL, + 0x8719014c99c2b083ULL, 0xfdc17184a9f739faULL, 0x72a9e0dcf9a9a271ULL, 0x08719014c99c2b08ULL, + 0x4721e43f0183060cULL, 0x3df994f731b68f75ULL, 0xb29105af61e814feULL, 0xc849756751dd9d87ULL, + 0x2c31edf8f1d64ef6ULL, 0x56e99d30c1e3c78fULL, 0xd9810c6891bd5c04ULL, 0xa3597ca0a188d57dULL, + 0xec09088b6997f879ULL, 0x96d1784359a27100ULL, 0x19b9e91b09fcea8bULL, 0x636199d339c963f2ULL, + 0xdf7adabd7a6e2d6fULL, 0xa5a2aa754a5ba416ULL, 0x2aca3b2d1a053f9dULL, 0x50124be52a30b6e4ULL, + 0x1f423fcee22f9be0ULL, 0x659a4f06d21a1299ULL, 0xeaf2de5e82448912ULL, 0x902aae96b271006bULL, + 0x74523609127ad31aULL, 0x0e8a46c1224f5a63ULL, 0x81e2d7997211c1e8ULL, 0xfb3aa75142244891ULL, + 0xb46ad37a8a3b6595ULL, 0xceb2a3b2ba0eececULL, 0x41da32eaea507767ULL, 0x3b024222da65fe1eULL, + 0xa2722586f2d042eeULL, 0xd8aa554ec2e5cb97ULL, 0x57c2c41692bb501cULL, 0x2d1ab4dea28ed965ULL, + 0x624ac0f56a91f461ULL, 0x1892b03d5aa47d18ULL, 0x97fa21650afae693ULL, 0xed2251ad3acf6feaULL, + 0x095ac9329ac4bc9bULL, 0x7382b9faaaf135e2ULL, 0xfcea28a2faafae69ULL, 0x8632586aca9a2710ULL, + 0xc9622c4102850a14ULL, 0xb3ba5c8932b0836dULL, 0x3cd2cdd162ee18e6ULL, 0x460abd1952db919fULL, + 0x256b24ca6b12f26dULL, 0x5fb354025b277b14ULL, 0xd0dbc55a0b79e09fULL, 0xaa03b5923b4c69e6ULL, + 0xe553c1b9f35344e2ULL, 0x9f8bb171c366cd9bULL, 0x10e3202993385610ULL, 0x6a3b50e1a30ddf69ULL, + 0x8e43c87e03060c18ULL, 0xf49bb8b633338561ULL, 0x7bf329ee636d1eeaULL, 0x012b592653589793ULL, + 0x4e7b2d0d9b47ba97ULL, 0x34a35dc5ab7233eeULL, 0xbbcbcc9dfb2ca865ULL, 0xc113bc55cb19211cULL, + 0x5863dbf1e3ac9decULL, 0x22bbab39d3991495ULL, 0xadd33a6183c78f1eULL, 0xd70b4aa9b3f20667ULL, + 0x985b3e827bed2b63ULL, 0xe2834e4a4bd8a21aULL, 0x6debdf121b863991ULL, 0x1733afda2bb3b0e8ULL, + 0xf34b37458bb86399ULL, 0x8993478dbb8deae0ULL, 0x06fbd6d5ebd3716bULL, 0x7c23a61ddbe6f812ULL, + 0x3373d23613f9d516ULL, 0x49aba2fe23cc5c6fULL, 0xc6c333a67392c7e4ULL, 0xbc1b436e43a74e9dULL, + 0x95ac9329ac4bc9b5ULL, 0xef74e3e19c7e40ccULL, 0x601c72b9cc20db47ULL, 0x1ac40271fc15523eULL, + 0x5594765a340a7f3aULL, 0x2f4c0692043ff643ULL, 0xa02497ca54616dc8ULL, 0xdafce7026454e4b1ULL, + 0x3e847f9dc45f37c0ULL, 0x445c0f55f46abeb9ULL, 0xcb349e0da4342532ULL, 0xb1eceec59401ac4bULL, + 0xfebc9aee5c1e814fULL, 0x8464ea266c2b0836ULL, 0x0b0c7b7e3c7593bdULL, 0x71d40bb60c401ac4ULL, + 0xe8a46c1224f5a634ULL, 0x927c1cda14c02f4dULL, 0x1d148d82449eb4c6ULL, 0x67ccfd4a74ab3dbfULL, + 0x289c8961bcb410bbULL, 0x5244f9a98c8199c2ULL, 0xdd2c68f1dcdf0249ULL, 0xa7f41839ecea8b30ULL, + 0x438c80a64ce15841ULL, 0x3954f06e7cd4d138ULL, 0xb63c61362c8a4ab3ULL, 0xcce411fe1cbfc3caULL, + 0x83b465d5d4a0eeceULL, 0xf96c151de49567b7ULL, 0x76048445b4cbfc3cULL, 0x0cdcf48d84fe7545ULL, + 0x6fbd6d5ebd3716b7ULL, 0x15651d968d029fceULL, 0x9a0d8ccedd5c0445ULL, 0xe0d5fc06ed698d3cULL, + 0xaf85882d2576a038ULL, 0xd55df8e515432941ULL, 0x5a3569bd451db2caULL, 0x20ed197575283bb3ULL, + 0xc49581ead523e8c2ULL, 0xbe4df122e51661bbULL, 0x3125607ab548fa30ULL, 0x4bfd10b2857d7349ULL, + 0x04ad64994d625e4dULL, 0x7e7514517d57d734ULL, 0xf11d85092d094cbfULL, 0x8bc5f5c11d3cc5c6ULL, + 0x12b5926535897936ULL, 0x686de2ad05bcf04fULL, 0xe70573f555e26bc4ULL, 0x9ddd033d65d7e2bdULL, + 0xd28d7716adc8cfb9ULL, 0xa85507de9dfd46c0ULL, 0x273d9686cda3dd4bULL, 0x5de5e64efd965432ULL, + 0xb99d7ed15d9d8743ULL, 0xc3450e196da80e3aULL, 0x4c2d9f413df695b1ULL, 0x36f5ef890dc31cc8ULL, + 0x79a59ba2c5dc31ccULL, 0x037deb6af5e9b8b5ULL, 0x8c157a32a5b7233eULL, 0xf6cd0afa9582aa47ULL, + 0x4ad64994d625e4daULL, 0x300e395ce6106da3ULL, 0xbf66a804b64ef628ULL, 0xc5bed8cc867b7f51ULL, + 0x8aeeace74e645255ULL, 0xf036dc2f7e51db2cULL, 0x7f5e4d772e0f40a7ULL, 0x05863dbf1e3ac9deULL, + 0xe1fea520be311aafULL, 0x9b26d5e88e0493d6ULL, 0x144e44b0de5a085dULL, 0x6e963478ee6f8124ULL, + 0x21c640532670ac20ULL, 0x5b1e309b16452559ULL, 0xd476a1c3461bbed2ULL, 0xaeaed10b762e37abULL, + 0x37deb6af5e9b8b5bULL, 0x4d06c6676eae0222ULL, 0xc26e573f3ef099a9ULL, 0xb8b627f70ec510d0ULL, + 0xf7e653dcc6da3dd4ULL, 0x8d3e2314f6efb4adULL, 0x0256b24ca6b12f26ULL, 0x788ec2849684a65fULL, + 0x9cf65a1b368f752eULL, 0xe62e2ad306bafc57ULL, 0x6946bb8b56e467dcULL, 0x139ecb4366d1eea5ULL, + 0x5ccebf68aecec3a1ULL, 0x2616cfa09efb4ad8ULL, 0xa97e5ef8cea5d153ULL, 0xd3a62e30fe90582aULL, + 0xb0c7b7e3c7593bd8ULL, 0xca1fc72bf76cb2a1ULL, 0x45775673a732292aULL, 0x3faf26bb9707a053ULL, + 0x70ff52905f188d57ULL, 0x0a2722586f2d042eULL, 0x854fb3003f739fa5ULL, 0xff97c3c80f4616dcULL, + 0x1bef5b57af4dc5adULL, 0x61372b9f9f784cd4ULL, 0xee5fbac7cf26d75fULL, 0x9487ca0fff135e26ULL, + 0xdbd7be24370c7322ULL, 0xa10fceec0739fa5bULL, 0x2e675fb4576761d0ULL, 0x54bf2f7c6752e8a9ULL, + 0xcdcf48d84fe75459ULL, 0xb71738107fd2dd20ULL, 0x387fa9482f8c46abULL, 0x42a7d9801fb9cfd2ULL, + 0x0df7adabd7a6e2d6ULL, 0x772fdd63e7936bafULL, 0xf8474c3bb7cdf024ULL, 0x829f3cf387f8795dULL, + 0x66e7a46c27f3aa2cULL, 0x1c3fd4a417c62355ULL, 0x935745fc4798b8deULL, 0xe98f353477ad31a7ULL, + 0xa6df411fbfb21ca3ULL, 0xdc0731d78f8795daULL, 0x536fa08fdfd90e51ULL, 0x29b7d047efec8728ULL }; static const uint64_t crc64_jones_norm_table[256] = { - 0x0000000000000000ULL, 0xad93d23594c935a9ULL, - 0xf6b4765ebd5b5efbULL, 0x5b27a46b29926b52ULL, - 0x40fb3e88ee7f885fULL, 0xed68ecbd7ab6bdf6ULL, - 0xb64f48d65324d6a4ULL, 0x1bdc9ae3c7ede30dULL, - 0x81f67d11dcff10beULL, 0x2c65af2448362517ULL, - 0x77420b4f61a44e45ULL, 0xdad1d97af56d7becULL, - 0xc10d4399328098e1ULL, 0x6c9e91aca649ad48ULL, - 0x37b935c78fdbc61aULL, 0x9a2ae7f21b12f3b3ULL, - 0xae7f28162d3714d5ULL, 0x03ecfa23b9fe217cULL, - 0x58cb5e48906c4a2eULL, 0xf5588c7d04a57f87ULL, - 0xee84169ec3489c8aULL, 0x4317c4ab5781a923ULL, - 0x183060c07e13c271ULL, 0xb5a3b2f5eadaf7d8ULL, - 0x2f895507f1c8046bULL, 0x821a8732650131c2ULL, - 0xd93d23594c935a90ULL, 0x74aef16cd85a6f39ULL, - 0x6f726b8f1fb78c34ULL, 0xc2e1b9ba8b7eb99dULL, - 0x99c61dd1a2ecd2cfULL, 0x3455cfe43625e766ULL, - 0xf16d8219cea71c03ULL, 0x5cfe502c5a6e29aaULL, - 0x07d9f44773fc42f8ULL, 0xaa4a2672e7357751ULL, - 0xb196bc9120d8945cULL, 0x1c056ea4b411a1f5ULL, - 0x4722cacf9d83caa7ULL, 0xeab118fa094aff0eULL, - 0x709bff0812580cbdULL, 0xdd082d3d86913914ULL, - 0x862f8956af035246ULL, 0x2bbc5b633bca67efULL, - 0x3060c180fc2784e2ULL, 0x9df313b568eeb14bULL, - 0xc6d4b7de417cda19ULL, 0x6b4765ebd5b5efb0ULL, - 0x5f12aa0fe39008d6ULL, 0xf281783a77593d7fULL, - 0xa9a6dc515ecb562dULL, 0x04350e64ca026384ULL, - 0x1fe994870def8089ULL, 0xb27a46b29926b520ULL, - 0xe95de2d9b0b4de72ULL, 0x44ce30ec247debdbULL, - 0xdee4d71e3f6f1868ULL, 0x7377052baba62dc1ULL, - 0x2850a14082344693ULL, 0x85c3737516fd733aULL, - 0x9e1fe996d1109037ULL, 0x338c3ba345d9a59eULL, - 0x68ab9fc86c4bceccULL, 0xc5384dfdf882fb65ULL, - 0x4f48d60609870dafULL, 0xe2db04339d4e3806ULL, - 0xb9fca058b4dc5354ULL, 0x146f726d201566fdULL, - 0x0fb3e88ee7f885f0ULL, 0xa2203abb7331b059ULL, - 0xf9079ed05aa3db0bULL, 0x54944ce5ce6aeea2ULL, - 0xcebeab17d5781d11ULL, 0x632d792241b128b8ULL, - 0x380add49682343eaULL, 0x95990f7cfcea7643ULL, - 0x8e45959f3b07954eULL, 0x23d647aaafcea0e7ULL, - 0x78f1e3c1865ccbb5ULL, 0xd56231f41295fe1cULL, - 0xe137fe1024b0197aULL, 0x4ca42c25b0792cd3ULL, - 0x1783884e99eb4781ULL, 0xba105a7b0d227228ULL, - 0xa1ccc098cacf9125ULL, 0x0c5f12ad5e06a48cULL, - 0x5778b6c67794cfdeULL, 0xfaeb64f3e35dfa77ULL, - 0x60c18301f84f09c4ULL, 0xcd5251346c863c6dULL, - 0x9675f55f4514573fULL, 0x3be6276ad1dd6296ULL, - 0x203abd891630819bULL, 0x8da96fbc82f9b432ULL, - 0xd68ecbd7ab6bdf60ULL, 0x7b1d19e23fa2eac9ULL, - 0xbe25541fc72011acULL, 0x13b6862a53e92405ULL, - 0x489122417a7b4f57ULL, 0xe502f074eeb27afeULL, - 0xfede6a97295f99f3ULL, 0x534db8a2bd96ac5aULL, - 0x086a1cc99404c708ULL, 0xa5f9cefc00cdf2a1ULL, - 0x3fd3290e1bdf0112ULL, 0x9240fb3b8f1634bbULL, - 0xc9675f50a6845fe9ULL, 0x64f48d65324d6a40ULL, - 0x7f281786f5a0894dULL, 0xd2bbc5b36169bce4ULL, - 0x899c61d848fbd7b6ULL, 0x240fb3eddc32e21fULL, - 0x105a7c09ea170579ULL, 0xbdc9ae3c7ede30d0ULL, - 0xe6ee0a57574c5b82ULL, 0x4b7dd862c3856e2bULL, - 0x50a1428104688d26ULL, 0xfd3290b490a1b88fULL, - 0xa61534dfb933d3ddULL, 0x0b86e6ea2dfae674ULL, - 0x91ac011836e815c7ULL, 0x3c3fd32da221206eULL, - 0x671877468bb34b3cULL, 0xca8ba5731f7a7e95ULL, - 0xd1573f90d8979d98ULL, 0x7cc4eda54c5ea831ULL, - 0x27e349ce65ccc363ULL, 0x8a709bfbf105f6caULL, - 0x9e91ac0c130e1b5eULL, 0x33027e3987c72ef7ULL, - 0x6825da52ae5545a5ULL, 0xc5b608673a9c700cULL, - 0xde6a9284fd719301ULL, 0x73f940b169b8a6a8ULL, - 0x28dee4da402acdfaULL, 0x854d36efd4e3f853ULL, - 0x1f67d11dcff10be0ULL, 0xb2f403285b383e49ULL, - 0xe9d3a74372aa551bULL, 0x44407576e66360b2ULL, - 0x5f9cef95218e83bfULL, 0xf20f3da0b547b616ULL, - 0xa92899cb9cd5dd44ULL, 0x04bb4bfe081ce8edULL, - 0x30ee841a3e390f8bULL, 0x9d7d562faaf03a22ULL, - 0xc65af24483625170ULL, 0x6bc9207117ab64d9ULL, - 0x7015ba92d04687d4ULL, 0xdd8668a7448fb27dULL, - 0x86a1cccc6d1dd92fULL, 0x2b321ef9f9d4ec86ULL, - 0xb118f90be2c61f35ULL, 0x1c8b2b3e760f2a9cULL, - 0x47ac8f555f9d41ceULL, 0xea3f5d60cb547467ULL, - 0xf1e3c7830cb9976aULL, 0x5c7015b69870a2c3ULL, - 0x0757b1ddb1e2c991ULL, 0xaac463e8252bfc38ULL, - 0x6ffc2e15dda9075dULL, 0xc26ffc20496032f4ULL, - 0x9948584b60f259a6ULL, 0x34db8a7ef43b6c0fULL, - 0x2f07109d33d68f02ULL, 0x8294c2a8a71fbaabULL, - 0xd9b366c38e8dd1f9ULL, 0x7420b4f61a44e450ULL, - 0xee0a5304015617e3ULL, 0x43998131959f224aULL, - 0x18be255abc0d4918ULL, 0xb52df76f28c47cb1ULL, - 0xaef16d8cef299fbcULL, 0x0362bfb97be0aa15ULL, - 0x58451bd25272c147ULL, 0xf5d6c9e7c6bbf4eeULL, - 0xc1830603f09e1388ULL, 0x6c10d43664572621ULL, - 0x3737705d4dc54d73ULL, 0x9aa4a268d90c78daULL, - 0x8178388b1ee19bd7ULL, 0x2cebeabe8a28ae7eULL, - 0x77cc4ed5a3bac52cULL, 0xda5f9ce03773f085ULL, - 0x40757b122c610336ULL, 0xede6a927b8a8369fULL, - 0xb6c10d4c913a5dcdULL, 0x1b52df7905f36864ULL, - 0x008e459ac21e8b69ULL, 0xad1d97af56d7bec0ULL, - 0xf63a33c47f45d592ULL, 0x5ba9e1f1eb8ce03bULL, - 0xd1d97a0a1a8916f1ULL, 0x7c4aa83f8e402358ULL, - 0x276d0c54a7d2480aULL, 0x8afede61331b7da3ULL, - 0x91224482f4f69eaeULL, 0x3cb196b7603fab07ULL, - 0x679632dc49adc055ULL, 0xca05e0e9dd64f5fcULL, - 0x502f071bc676064fULL, 0xfdbcd52e52bf33e6ULL, - 0xa69b71457b2d58b4ULL, 0x0b08a370efe46d1dULL, - 0x10d4399328098e10ULL, 0xbd47eba6bcc0bbb9ULL, - 0xe6604fcd9552d0ebULL, 0x4bf39df8019be542ULL, - 0x7fa6521c37be0224ULL, 0xd2358029a377378dULL, - 0x891224428ae55cdfULL, 0x2481f6771e2c6976ULL, - 0x3f5d6c94d9c18a7bULL, 0x92cebea14d08bfd2ULL, - 0xc9e91aca649ad480ULL, 0x647ac8fff053e129ULL, - 0xfe502f0deb41129aULL, 0x53c3fd387f882733ULL, - 0x08e45953561a4c61ULL, 0xa5778b66c2d379c8ULL, - 0xbeab1185053e9ac5ULL, 0x1338c3b091f7af6cULL, - 0x481f67dbb865c43eULL, 0xe58cb5ee2cacf197ULL, - 0x20b4f813d42e0af2ULL, 0x8d272a2640e73f5bULL, - 0xd6008e4d69755409ULL, 0x7b935c78fdbc61a0ULL, - 0x604fc69b3a5182adULL, 0xcddc14aeae98b704ULL, - 0x96fbb0c5870adc56ULL, 0x3b6862f013c3e9ffULL, - 0xa142850208d11a4cULL, 0x0cd157379c182fe5ULL, - 0x57f6f35cb58a44b7ULL, 0xfa6521692143711eULL, - 0xe1b9bb8ae6ae9213ULL, 0x4c2a69bf7267a7baULL, - 0x170dcdd45bf5cce8ULL, 0xba9e1fe1cf3cf941ULL, - 0x8ecbd005f9191e27ULL, 0x235802306dd02b8eULL, - 0x787fa65b444240dcULL, 0xd5ec746ed08b7575ULL, - 0xce30ee8d17669678ULL, 0x63a33cb883afa3d1ULL, - 0x388498d3aa3dc883ULL, 0x95174ae63ef4fd2aULL, - 0x0f3dad1425e60e99ULL, 0xa2ae7f21b12f3b30ULL, - 0xf989db4a98bd5062ULL, 0x541a097f0c7465cbULL, - 0x4fc6939ccb9986c6ULL, 0xe25541a95f50b36fULL, - 0xb972e5c276c2d83dULL, 0x14e137f7e20bed94ULL + 0x0000000000000000ULL, 0xad93d23594c935a9ULL, 0xf6b4765ebd5b5efbULL, 0x5b27a46b29926b52ULL, + 0x40fb3e88ee7f885fULL, 0xed68ecbd7ab6bdf6ULL, 0xb64f48d65324d6a4ULL, 0x1bdc9ae3c7ede30dULL, + 0x81f67d11dcff10beULL, 0x2c65af2448362517ULL, 0x77420b4f61a44e45ULL, 0xdad1d97af56d7becULL, + 0xc10d4399328098e1ULL, 0x6c9e91aca649ad48ULL, 0x37b935c78fdbc61aULL, 0x9a2ae7f21b12f3b3ULL, + 0xae7f28162d3714d5ULL, 0x03ecfa23b9fe217cULL, 0x58cb5e48906c4a2eULL, 0xf5588c7d04a57f87ULL, + 0xee84169ec3489c8aULL, 0x4317c4ab5781a923ULL, 0x183060c07e13c271ULL, 0xb5a3b2f5eadaf7d8ULL, + 0x2f895507f1c8046bULL, 0x821a8732650131c2ULL, 0xd93d23594c935a90ULL, 0x74aef16cd85a6f39ULL, + 0x6f726b8f1fb78c34ULL, 0xc2e1b9ba8b7eb99dULL, 0x99c61dd1a2ecd2cfULL, 0x3455cfe43625e766ULL, + 0xf16d8219cea71c03ULL, 0x5cfe502c5a6e29aaULL, 0x07d9f44773fc42f8ULL, 0xaa4a2672e7357751ULL, + 0xb196bc9120d8945cULL, 0x1c056ea4b411a1f5ULL, 0x4722cacf9d83caa7ULL, 0xeab118fa094aff0eULL, + 0x709bff0812580cbdULL, 0xdd082d3d86913914ULL, 0x862f8956af035246ULL, 0x2bbc5b633bca67efULL, + 0x3060c180fc2784e2ULL, 0x9df313b568eeb14bULL, 0xc6d4b7de417cda19ULL, 0x6b4765ebd5b5efb0ULL, + 0x5f12aa0fe39008d6ULL, 0xf281783a77593d7fULL, 0xa9a6dc515ecb562dULL, 0x04350e64ca026384ULL, + 0x1fe994870def8089ULL, 0xb27a46b29926b520ULL, 0xe95de2d9b0b4de72ULL, 0x44ce30ec247debdbULL, + 0xdee4d71e3f6f1868ULL, 0x7377052baba62dc1ULL, 0x2850a14082344693ULL, 0x85c3737516fd733aULL, + 0x9e1fe996d1109037ULL, 0x338c3ba345d9a59eULL, 0x68ab9fc86c4bceccULL, 0xc5384dfdf882fb65ULL, + 0x4f48d60609870dafULL, 0xe2db04339d4e3806ULL, 0xb9fca058b4dc5354ULL, 0x146f726d201566fdULL, + 0x0fb3e88ee7f885f0ULL, 0xa2203abb7331b059ULL, 0xf9079ed05aa3db0bULL, 0x54944ce5ce6aeea2ULL, + 0xcebeab17d5781d11ULL, 0x632d792241b128b8ULL, 0x380add49682343eaULL, 0x95990f7cfcea7643ULL, + 0x8e45959f3b07954eULL, 0x23d647aaafcea0e7ULL, 0x78f1e3c1865ccbb5ULL, 0xd56231f41295fe1cULL, + 0xe137fe1024b0197aULL, 0x4ca42c25b0792cd3ULL, 0x1783884e99eb4781ULL, 0xba105a7b0d227228ULL, + 0xa1ccc098cacf9125ULL, 0x0c5f12ad5e06a48cULL, 0x5778b6c67794cfdeULL, 0xfaeb64f3e35dfa77ULL, + 0x60c18301f84f09c4ULL, 0xcd5251346c863c6dULL, 0x9675f55f4514573fULL, 0x3be6276ad1dd6296ULL, + 0x203abd891630819bULL, 0x8da96fbc82f9b432ULL, 0xd68ecbd7ab6bdf60ULL, 0x7b1d19e23fa2eac9ULL, + 0xbe25541fc72011acULL, 0x13b6862a53e92405ULL, 0x489122417a7b4f57ULL, 0xe502f074eeb27afeULL, + 0xfede6a97295f99f3ULL, 0x534db8a2bd96ac5aULL, 0x086a1cc99404c708ULL, 0xa5f9cefc00cdf2a1ULL, + 0x3fd3290e1bdf0112ULL, 0x9240fb3b8f1634bbULL, 0xc9675f50a6845fe9ULL, 0x64f48d65324d6a40ULL, + 0x7f281786f5a0894dULL, 0xd2bbc5b36169bce4ULL, 0x899c61d848fbd7b6ULL, 0x240fb3eddc32e21fULL, + 0x105a7c09ea170579ULL, 0xbdc9ae3c7ede30d0ULL, 0xe6ee0a57574c5b82ULL, 0x4b7dd862c3856e2bULL, + 0x50a1428104688d26ULL, 0xfd3290b490a1b88fULL, 0xa61534dfb933d3ddULL, 0x0b86e6ea2dfae674ULL, + 0x91ac011836e815c7ULL, 0x3c3fd32da221206eULL, 0x671877468bb34b3cULL, 0xca8ba5731f7a7e95ULL, + 0xd1573f90d8979d98ULL, 0x7cc4eda54c5ea831ULL, 0x27e349ce65ccc363ULL, 0x8a709bfbf105f6caULL, + 0x9e91ac0c130e1b5eULL, 0x33027e3987c72ef7ULL, 0x6825da52ae5545a5ULL, 0xc5b608673a9c700cULL, + 0xde6a9284fd719301ULL, 0x73f940b169b8a6a8ULL, 0x28dee4da402acdfaULL, 0x854d36efd4e3f853ULL, + 0x1f67d11dcff10be0ULL, 0xb2f403285b383e49ULL, 0xe9d3a74372aa551bULL, 0x44407576e66360b2ULL, + 0x5f9cef95218e83bfULL, 0xf20f3da0b547b616ULL, 0xa92899cb9cd5dd44ULL, 0x04bb4bfe081ce8edULL, + 0x30ee841a3e390f8bULL, 0x9d7d562faaf03a22ULL, 0xc65af24483625170ULL, 0x6bc9207117ab64d9ULL, + 0x7015ba92d04687d4ULL, 0xdd8668a7448fb27dULL, 0x86a1cccc6d1dd92fULL, 0x2b321ef9f9d4ec86ULL, + 0xb118f90be2c61f35ULL, 0x1c8b2b3e760f2a9cULL, 0x47ac8f555f9d41ceULL, 0xea3f5d60cb547467ULL, + 0xf1e3c7830cb9976aULL, 0x5c7015b69870a2c3ULL, 0x0757b1ddb1e2c991ULL, 0xaac463e8252bfc38ULL, + 0x6ffc2e15dda9075dULL, 0xc26ffc20496032f4ULL, 0x9948584b60f259a6ULL, 0x34db8a7ef43b6c0fULL, + 0x2f07109d33d68f02ULL, 0x8294c2a8a71fbaabULL, 0xd9b366c38e8dd1f9ULL, 0x7420b4f61a44e450ULL, + 0xee0a5304015617e3ULL, 0x43998131959f224aULL, 0x18be255abc0d4918ULL, 0xb52df76f28c47cb1ULL, + 0xaef16d8cef299fbcULL, 0x0362bfb97be0aa15ULL, 0x58451bd25272c147ULL, 0xf5d6c9e7c6bbf4eeULL, + 0xc1830603f09e1388ULL, 0x6c10d43664572621ULL, 0x3737705d4dc54d73ULL, 0x9aa4a268d90c78daULL, + 0x8178388b1ee19bd7ULL, 0x2cebeabe8a28ae7eULL, 0x77cc4ed5a3bac52cULL, 0xda5f9ce03773f085ULL, + 0x40757b122c610336ULL, 0xede6a927b8a8369fULL, 0xb6c10d4c913a5dcdULL, 0x1b52df7905f36864ULL, + 0x008e459ac21e8b69ULL, 0xad1d97af56d7bec0ULL, 0xf63a33c47f45d592ULL, 0x5ba9e1f1eb8ce03bULL, + 0xd1d97a0a1a8916f1ULL, 0x7c4aa83f8e402358ULL, 0x276d0c54a7d2480aULL, 0x8afede61331b7da3ULL, + 0x91224482f4f69eaeULL, 0x3cb196b7603fab07ULL, 0x679632dc49adc055ULL, 0xca05e0e9dd64f5fcULL, + 0x502f071bc676064fULL, 0xfdbcd52e52bf33e6ULL, 0xa69b71457b2d58b4ULL, 0x0b08a370efe46d1dULL, + 0x10d4399328098e10ULL, 0xbd47eba6bcc0bbb9ULL, 0xe6604fcd9552d0ebULL, 0x4bf39df8019be542ULL, + 0x7fa6521c37be0224ULL, 0xd2358029a377378dULL, 0x891224428ae55cdfULL, 0x2481f6771e2c6976ULL, + 0x3f5d6c94d9c18a7bULL, 0x92cebea14d08bfd2ULL, 0xc9e91aca649ad480ULL, 0x647ac8fff053e129ULL, + 0xfe502f0deb41129aULL, 0x53c3fd387f882733ULL, 0x08e45953561a4c61ULL, 0xa5778b66c2d379c8ULL, + 0xbeab1185053e9ac5ULL, 0x1338c3b091f7af6cULL, 0x481f67dbb865c43eULL, 0xe58cb5ee2cacf197ULL, + 0x20b4f813d42e0af2ULL, 0x8d272a2640e73f5bULL, 0xd6008e4d69755409ULL, 0x7b935c78fdbc61a0ULL, + 0x604fc69b3a5182adULL, 0xcddc14aeae98b704ULL, 0x96fbb0c5870adc56ULL, 0x3b6862f013c3e9ffULL, + 0xa142850208d11a4cULL, 0x0cd157379c182fe5ULL, 0x57f6f35cb58a44b7ULL, 0xfa6521692143711eULL, + 0xe1b9bb8ae6ae9213ULL, 0x4c2a69bf7267a7baULL, 0x170dcdd45bf5cce8ULL, 0xba9e1fe1cf3cf941ULL, + 0x8ecbd005f9191e27ULL, 0x235802306dd02b8eULL, 0x787fa65b444240dcULL, 0xd5ec746ed08b7575ULL, + 0xce30ee8d17669678ULL, 0x63a33cb883afa3d1ULL, 0x388498d3aa3dc883ULL, 0x95174ae63ef4fd2aULL, + 0x0f3dad1425e60e99ULL, 0xa2ae7f21b12f3b30ULL, 0xf989db4a98bd5062ULL, 0x541a097f0c7465cbULL, + 0x4fc6939ccb9986c6ULL, 0xe25541a95f50b36fULL, 0xb972e5c276c2d83dULL, 0x14e137f7e20bed94ULL }; static const uint64_t crc64_rocksoft_refl_table[256] = { - 0x0000000000000000ULL, 0x7f6ef0c830358979ULL, - 0xfedde190606b12f2ULL, 0x81b31158505e9b8bULL, - 0xc962e5739841b68fULL, 0xb60c15bba8743ff6ULL, - 0x37bf04e3f82aa47dULL, 0x48d1f42bc81f2d04ULL, - 0xa61cecb46814fe75ULL, 0xd9721c7c5821770cULL, - 0x58c10d24087fec87ULL, 0x27affdec384a65feULL, - 0x6f7e09c7f05548faULL, 0x1010f90fc060c183ULL, - 0x91a3e857903e5a08ULL, 0xeecd189fa00bd371ULL, - 0x78e0ff3b88be6f81ULL, 0x078e0ff3b88be6f8ULL, - 0x863d1eabe8d57d73ULL, 0xf953ee63d8e0f40aULL, - 0xb1821a4810ffd90eULL, 0xceecea8020ca5077ULL, - 0x4f5ffbd87094cbfcULL, 0x30310b1040a14285ULL, - 0xdefc138fe0aa91f4ULL, 0xa192e347d09f188dULL, - 0x2021f21f80c18306ULL, 0x5f4f02d7b0f40a7fULL, - 0x179ef6fc78eb277bULL, 0x68f0063448deae02ULL, - 0xe943176c18803589ULL, 0x962de7a428b5bcf0ULL, - 0xf1c1fe77117cdf02ULL, 0x8eaf0ebf2149567bULL, - 0x0f1c1fe77117cdf0ULL, 0x7072ef2f41224489ULL, - 0x38a31b04893d698dULL, 0x47cdebccb908e0f4ULL, - 0xc67efa94e9567b7fULL, 0xb9100a5cd963f206ULL, - 0x57dd12c379682177ULL, 0x28b3e20b495da80eULL, - 0xa900f35319033385ULL, 0xd66e039b2936bafcULL, - 0x9ebff7b0e12997f8ULL, 0xe1d10778d11c1e81ULL, - 0x606216208142850aULL, 0x1f0ce6e8b1770c73ULL, - 0x8921014c99c2b083ULL, 0xf64ff184a9f739faULL, - 0x77fce0dcf9a9a271ULL, 0x08921014c99c2b08ULL, - 0x4043e43f0183060cULL, 0x3f2d14f731b68f75ULL, - 0xbe9e05af61e814feULL, 0xc1f0f56751dd9d87ULL, - 0x2f3dedf8f1d64ef6ULL, 0x50531d30c1e3c78fULL, - 0xd1e00c6891bd5c04ULL, 0xae8efca0a188d57dULL, - 0xe65f088b6997f879ULL, 0x9931f84359a27100ULL, - 0x1882e91b09fcea8bULL, 0x67ec19d339c963f2ULL, - 0xd75adabd7a6e2d6fULL, 0xa8342a754a5ba416ULL, - 0x29873b2d1a053f9dULL, 0x56e9cbe52a30b6e4ULL, - 0x1e383fcee22f9be0ULL, 0x6156cf06d21a1299ULL, - 0xe0e5de5e82448912ULL, 0x9f8b2e96b271006bULL, - 0x71463609127ad31aULL, 0x0e28c6c1224f5a63ULL, - 0x8f9bd7997211c1e8ULL, 0xf0f5275142244891ULL, - 0xb824d37a8a3b6595ULL, 0xc74a23b2ba0eececULL, - 0x46f932eaea507767ULL, 0x3997c222da65fe1eULL, - 0xafba2586f2d042eeULL, 0xd0d4d54ec2e5cb97ULL, - 0x5167c41692bb501cULL, 0x2e0934dea28ed965ULL, - 0x66d8c0f56a91f461ULL, 0x19b6303d5aa47d18ULL, - 0x980521650afae693ULL, 0xe76bd1ad3acf6feaULL, - 0x09a6c9329ac4bc9bULL, 0x76c839faaaf135e2ULL, - 0xf77b28a2faafae69ULL, 0x8815d86aca9a2710ULL, - 0xc0c42c4102850a14ULL, 0xbfaadc8932b0836dULL, - 0x3e19cdd162ee18e6ULL, 0x41773d1952db919fULL, - 0x269b24ca6b12f26dULL, 0x59f5d4025b277b14ULL, - 0xd846c55a0b79e09fULL, 0xa72835923b4c69e6ULL, - 0xeff9c1b9f35344e2ULL, 0x90973171c366cd9bULL, - 0x1124202993385610ULL, 0x6e4ad0e1a30ddf69ULL, - 0x8087c87e03060c18ULL, 0xffe938b633338561ULL, - 0x7e5a29ee636d1eeaULL, 0x0134d92653589793ULL, - 0x49e52d0d9b47ba97ULL, 0x368bddc5ab7233eeULL, - 0xb738cc9dfb2ca865ULL, 0xc8563c55cb19211cULL, - 0x5e7bdbf1e3ac9decULL, 0x21152b39d3991495ULL, - 0xa0a63a6183c78f1eULL, 0xdfc8caa9b3f20667ULL, - 0x97193e827bed2b63ULL, 0xe877ce4a4bd8a21aULL, - 0x69c4df121b863991ULL, 0x16aa2fda2bb3b0e8ULL, - 0xf86737458bb86399ULL, 0x8709c78dbb8deae0ULL, - 0x06bad6d5ebd3716bULL, 0x79d4261ddbe6f812ULL, - 0x3105d23613f9d516ULL, 0x4e6b22fe23cc5c6fULL, - 0xcfd833a67392c7e4ULL, 0xb0b6c36e43a74e9dULL, - 0x9a6c9329ac4bc9b5ULL, 0xe50263e19c7e40ccULL, - 0x64b172b9cc20db47ULL, 0x1bdf8271fc15523eULL, - 0x530e765a340a7f3aULL, 0x2c608692043ff643ULL, - 0xadd397ca54616dc8ULL, 0xd2bd67026454e4b1ULL, - 0x3c707f9dc45f37c0ULL, 0x431e8f55f46abeb9ULL, - 0xc2ad9e0da4342532ULL, 0xbdc36ec59401ac4bULL, - 0xf5129aee5c1e814fULL, 0x8a7c6a266c2b0836ULL, - 0x0bcf7b7e3c7593bdULL, 0x74a18bb60c401ac4ULL, - 0xe28c6c1224f5a634ULL, 0x9de29cda14c02f4dULL, - 0x1c518d82449eb4c6ULL, 0x633f7d4a74ab3dbfULL, - 0x2bee8961bcb410bbULL, 0x548079a98c8199c2ULL, - 0xd53368f1dcdf0249ULL, 0xaa5d9839ecea8b30ULL, - 0x449080a64ce15841ULL, 0x3bfe706e7cd4d138ULL, - 0xba4d61362c8a4ab3ULL, 0xc52391fe1cbfc3caULL, - 0x8df265d5d4a0eeceULL, 0xf29c951de49567b7ULL, - 0x732f8445b4cbfc3cULL, 0x0c41748d84fe7545ULL, - 0x6bad6d5ebd3716b7ULL, 0x14c39d968d029fceULL, - 0x95708ccedd5c0445ULL, 0xea1e7c06ed698d3cULL, - 0xa2cf882d2576a038ULL, 0xdda178e515432941ULL, - 0x5c1269bd451db2caULL, 0x237c997575283bb3ULL, - 0xcdb181ead523e8c2ULL, 0xb2df7122e51661bbULL, - 0x336c607ab548fa30ULL, 0x4c0290b2857d7349ULL, - 0x04d364994d625e4dULL, 0x7bbd94517d57d734ULL, - 0xfa0e85092d094cbfULL, 0x856075c11d3cc5c6ULL, - 0x134d926535897936ULL, 0x6c2362ad05bcf04fULL, - 0xed9073f555e26bc4ULL, 0x92fe833d65d7e2bdULL, - 0xda2f7716adc8cfb9ULL, 0xa54187de9dfd46c0ULL, - 0x24f29686cda3dd4bULL, 0x5b9c664efd965432ULL, - 0xb5517ed15d9d8743ULL, 0xca3f8e196da80e3aULL, - 0x4b8c9f413df695b1ULL, 0x34e26f890dc31cc8ULL, - 0x7c339ba2c5dc31ccULL, 0x035d6b6af5e9b8b5ULL, - 0x82ee7a32a5b7233eULL, 0xfd808afa9582aa47ULL, - 0x4d364994d625e4daULL, 0x3258b95ce6106da3ULL, - 0xb3eba804b64ef628ULL, 0xcc8558cc867b7f51ULL, - 0x8454ace74e645255ULL, 0xfb3a5c2f7e51db2cULL, - 0x7a894d772e0f40a7ULL, 0x05e7bdbf1e3ac9deULL, - 0xeb2aa520be311aafULL, 0x944455e88e0493d6ULL, - 0x15f744b0de5a085dULL, 0x6a99b478ee6f8124ULL, - 0x224840532670ac20ULL, 0x5d26b09b16452559ULL, - 0xdc95a1c3461bbed2ULL, 0xa3fb510b762e37abULL, - 0x35d6b6af5e9b8b5bULL, 0x4ab846676eae0222ULL, - 0xcb0b573f3ef099a9ULL, 0xb465a7f70ec510d0ULL, - 0xfcb453dcc6da3dd4ULL, 0x83daa314f6efb4adULL, - 0x0269b24ca6b12f26ULL, 0x7d0742849684a65fULL, - 0x93ca5a1b368f752eULL, 0xeca4aad306bafc57ULL, - 0x6d17bb8b56e467dcULL, 0x12794b4366d1eea5ULL, - 0x5aa8bf68aecec3a1ULL, 0x25c64fa09efb4ad8ULL, - 0xa4755ef8cea5d153ULL, 0xdb1bae30fe90582aULL, - 0xbcf7b7e3c7593bd8ULL, 0xc399472bf76cb2a1ULL, - 0x422a5673a732292aULL, 0x3d44a6bb9707a053ULL, - 0x759552905f188d57ULL, 0x0afba2586f2d042eULL, - 0x8b48b3003f739fa5ULL, 0xf42643c80f4616dcULL, - 0x1aeb5b57af4dc5adULL, 0x6585ab9f9f784cd4ULL, - 0xe436bac7cf26d75fULL, 0x9b584a0fff135e26ULL, - 0xd389be24370c7322ULL, 0xace74eec0739fa5bULL, - 0x2d545fb4576761d0ULL, 0x523aaf7c6752e8a9ULL, - 0xc41748d84fe75459ULL, 0xbb79b8107fd2dd20ULL, - 0x3acaa9482f8c46abULL, 0x45a459801fb9cfd2ULL, - 0x0d75adabd7a6e2d6ULL, 0x721b5d63e7936bafULL, - 0xf3a84c3bb7cdf024ULL, 0x8cc6bcf387f8795dULL, - 0x620ba46c27f3aa2cULL, 0x1d6554a417c62355ULL, - 0x9cd645fc4798b8deULL, 0xe3b8b53477ad31a7ULL, - 0xab69411fbfb21ca3ULL, 0xd407b1d78f8795daULL, - 0x55b4a08fdfd90e51ULL, 0x2ada5047efec8728ULL + 0x0000000000000000ULL, 0x7f6ef0c830358979ULL, 0xfedde190606b12f2ULL, 0x81b31158505e9b8bULL, + 0xc962e5739841b68fULL, 0xb60c15bba8743ff6ULL, 0x37bf04e3f82aa47dULL, 0x48d1f42bc81f2d04ULL, + 0xa61cecb46814fe75ULL, 0xd9721c7c5821770cULL, 0x58c10d24087fec87ULL, 0x27affdec384a65feULL, + 0x6f7e09c7f05548faULL, 0x1010f90fc060c183ULL, 0x91a3e857903e5a08ULL, 0xeecd189fa00bd371ULL, + 0x78e0ff3b88be6f81ULL, 0x078e0ff3b88be6f8ULL, 0x863d1eabe8d57d73ULL, 0xf953ee63d8e0f40aULL, + 0xb1821a4810ffd90eULL, 0xceecea8020ca5077ULL, 0x4f5ffbd87094cbfcULL, 0x30310b1040a14285ULL, + 0xdefc138fe0aa91f4ULL, 0xa192e347d09f188dULL, 0x2021f21f80c18306ULL, 0x5f4f02d7b0f40a7fULL, + 0x179ef6fc78eb277bULL, 0x68f0063448deae02ULL, 0xe943176c18803589ULL, 0x962de7a428b5bcf0ULL, + 0xf1c1fe77117cdf02ULL, 0x8eaf0ebf2149567bULL, 0x0f1c1fe77117cdf0ULL, 0x7072ef2f41224489ULL, + 0x38a31b04893d698dULL, 0x47cdebccb908e0f4ULL, 0xc67efa94e9567b7fULL, 0xb9100a5cd963f206ULL, + 0x57dd12c379682177ULL, 0x28b3e20b495da80eULL, 0xa900f35319033385ULL, 0xd66e039b2936bafcULL, + 0x9ebff7b0e12997f8ULL, 0xe1d10778d11c1e81ULL, 0x606216208142850aULL, 0x1f0ce6e8b1770c73ULL, + 0x8921014c99c2b083ULL, 0xf64ff184a9f739faULL, 0x77fce0dcf9a9a271ULL, 0x08921014c99c2b08ULL, + 0x4043e43f0183060cULL, 0x3f2d14f731b68f75ULL, 0xbe9e05af61e814feULL, 0xc1f0f56751dd9d87ULL, + 0x2f3dedf8f1d64ef6ULL, 0x50531d30c1e3c78fULL, 0xd1e00c6891bd5c04ULL, 0xae8efca0a188d57dULL, + 0xe65f088b6997f879ULL, 0x9931f84359a27100ULL, 0x1882e91b09fcea8bULL, 0x67ec19d339c963f2ULL, + 0xd75adabd7a6e2d6fULL, 0xa8342a754a5ba416ULL, 0x29873b2d1a053f9dULL, 0x56e9cbe52a30b6e4ULL, + 0x1e383fcee22f9be0ULL, 0x6156cf06d21a1299ULL, 0xe0e5de5e82448912ULL, 0x9f8b2e96b271006bULL, + 0x71463609127ad31aULL, 0x0e28c6c1224f5a63ULL, 0x8f9bd7997211c1e8ULL, 0xf0f5275142244891ULL, + 0xb824d37a8a3b6595ULL, 0xc74a23b2ba0eececULL, 0x46f932eaea507767ULL, 0x3997c222da65fe1eULL, + 0xafba2586f2d042eeULL, 0xd0d4d54ec2e5cb97ULL, 0x5167c41692bb501cULL, 0x2e0934dea28ed965ULL, + 0x66d8c0f56a91f461ULL, 0x19b6303d5aa47d18ULL, 0x980521650afae693ULL, 0xe76bd1ad3acf6feaULL, + 0x09a6c9329ac4bc9bULL, 0x76c839faaaf135e2ULL, 0xf77b28a2faafae69ULL, 0x8815d86aca9a2710ULL, + 0xc0c42c4102850a14ULL, 0xbfaadc8932b0836dULL, 0x3e19cdd162ee18e6ULL, 0x41773d1952db919fULL, + 0x269b24ca6b12f26dULL, 0x59f5d4025b277b14ULL, 0xd846c55a0b79e09fULL, 0xa72835923b4c69e6ULL, + 0xeff9c1b9f35344e2ULL, 0x90973171c366cd9bULL, 0x1124202993385610ULL, 0x6e4ad0e1a30ddf69ULL, + 0x8087c87e03060c18ULL, 0xffe938b633338561ULL, 0x7e5a29ee636d1eeaULL, 0x0134d92653589793ULL, + 0x49e52d0d9b47ba97ULL, 0x368bddc5ab7233eeULL, 0xb738cc9dfb2ca865ULL, 0xc8563c55cb19211cULL, + 0x5e7bdbf1e3ac9decULL, 0x21152b39d3991495ULL, 0xa0a63a6183c78f1eULL, 0xdfc8caa9b3f20667ULL, + 0x97193e827bed2b63ULL, 0xe877ce4a4bd8a21aULL, 0x69c4df121b863991ULL, 0x16aa2fda2bb3b0e8ULL, + 0xf86737458bb86399ULL, 0x8709c78dbb8deae0ULL, 0x06bad6d5ebd3716bULL, 0x79d4261ddbe6f812ULL, + 0x3105d23613f9d516ULL, 0x4e6b22fe23cc5c6fULL, 0xcfd833a67392c7e4ULL, 0xb0b6c36e43a74e9dULL, + 0x9a6c9329ac4bc9b5ULL, 0xe50263e19c7e40ccULL, 0x64b172b9cc20db47ULL, 0x1bdf8271fc15523eULL, + 0x530e765a340a7f3aULL, 0x2c608692043ff643ULL, 0xadd397ca54616dc8ULL, 0xd2bd67026454e4b1ULL, + 0x3c707f9dc45f37c0ULL, 0x431e8f55f46abeb9ULL, 0xc2ad9e0da4342532ULL, 0xbdc36ec59401ac4bULL, + 0xf5129aee5c1e814fULL, 0x8a7c6a266c2b0836ULL, 0x0bcf7b7e3c7593bdULL, 0x74a18bb60c401ac4ULL, + 0xe28c6c1224f5a634ULL, 0x9de29cda14c02f4dULL, 0x1c518d82449eb4c6ULL, 0x633f7d4a74ab3dbfULL, + 0x2bee8961bcb410bbULL, 0x548079a98c8199c2ULL, 0xd53368f1dcdf0249ULL, 0xaa5d9839ecea8b30ULL, + 0x449080a64ce15841ULL, 0x3bfe706e7cd4d138ULL, 0xba4d61362c8a4ab3ULL, 0xc52391fe1cbfc3caULL, + 0x8df265d5d4a0eeceULL, 0xf29c951de49567b7ULL, 0x732f8445b4cbfc3cULL, 0x0c41748d84fe7545ULL, + 0x6bad6d5ebd3716b7ULL, 0x14c39d968d029fceULL, 0x95708ccedd5c0445ULL, 0xea1e7c06ed698d3cULL, + 0xa2cf882d2576a038ULL, 0xdda178e515432941ULL, 0x5c1269bd451db2caULL, 0x237c997575283bb3ULL, + 0xcdb181ead523e8c2ULL, 0xb2df7122e51661bbULL, 0x336c607ab548fa30ULL, 0x4c0290b2857d7349ULL, + 0x04d364994d625e4dULL, 0x7bbd94517d57d734ULL, 0xfa0e85092d094cbfULL, 0x856075c11d3cc5c6ULL, + 0x134d926535897936ULL, 0x6c2362ad05bcf04fULL, 0xed9073f555e26bc4ULL, 0x92fe833d65d7e2bdULL, + 0xda2f7716adc8cfb9ULL, 0xa54187de9dfd46c0ULL, 0x24f29686cda3dd4bULL, 0x5b9c664efd965432ULL, + 0xb5517ed15d9d8743ULL, 0xca3f8e196da80e3aULL, 0x4b8c9f413df695b1ULL, 0x34e26f890dc31cc8ULL, + 0x7c339ba2c5dc31ccULL, 0x035d6b6af5e9b8b5ULL, 0x82ee7a32a5b7233eULL, 0xfd808afa9582aa47ULL, + 0x4d364994d625e4daULL, 0x3258b95ce6106da3ULL, 0xb3eba804b64ef628ULL, 0xcc8558cc867b7f51ULL, + 0x8454ace74e645255ULL, 0xfb3a5c2f7e51db2cULL, 0x7a894d772e0f40a7ULL, 0x05e7bdbf1e3ac9deULL, + 0xeb2aa520be311aafULL, 0x944455e88e0493d6ULL, 0x15f744b0de5a085dULL, 0x6a99b478ee6f8124ULL, + 0x224840532670ac20ULL, 0x5d26b09b16452559ULL, 0xdc95a1c3461bbed2ULL, 0xa3fb510b762e37abULL, + 0x35d6b6af5e9b8b5bULL, 0x4ab846676eae0222ULL, 0xcb0b573f3ef099a9ULL, 0xb465a7f70ec510d0ULL, + 0xfcb453dcc6da3dd4ULL, 0x83daa314f6efb4adULL, 0x0269b24ca6b12f26ULL, 0x7d0742849684a65fULL, + 0x93ca5a1b368f752eULL, 0xeca4aad306bafc57ULL, 0x6d17bb8b56e467dcULL, 0x12794b4366d1eea5ULL, + 0x5aa8bf68aecec3a1ULL, 0x25c64fa09efb4ad8ULL, 0xa4755ef8cea5d153ULL, 0xdb1bae30fe90582aULL, + 0xbcf7b7e3c7593bd8ULL, 0xc399472bf76cb2a1ULL, 0x422a5673a732292aULL, 0x3d44a6bb9707a053ULL, + 0x759552905f188d57ULL, 0x0afba2586f2d042eULL, 0x8b48b3003f739fa5ULL, 0xf42643c80f4616dcULL, + 0x1aeb5b57af4dc5adULL, 0x6585ab9f9f784cd4ULL, 0xe436bac7cf26d75fULL, 0x9b584a0fff135e26ULL, + 0xd389be24370c7322ULL, 0xace74eec0739fa5bULL, 0x2d545fb4576761d0ULL, 0x523aaf7c6752e8a9ULL, + 0xc41748d84fe75459ULL, 0xbb79b8107fd2dd20ULL, 0x3acaa9482f8c46abULL, 0x45a459801fb9cfd2ULL, + 0x0d75adabd7a6e2d6ULL, 0x721b5d63e7936bafULL, 0xf3a84c3bb7cdf024ULL, 0x8cc6bcf387f8795dULL, + 0x620ba46c27f3aa2cULL, 0x1d6554a417c62355ULL, 0x9cd645fc4798b8deULL, 0xe3b8b53477ad31a7ULL, + 0xab69411fbfb21ca3ULL, 0xd407b1d78f8795daULL, 0x55b4a08fdfd90e51ULL, 0x2ada5047efec8728ULL }; static const uint64_t crc64_rocksoft_norm_table[256] = { - 0x0000000000000000ULL, 0xad93d23594c93659ULL, - 0xf6b4765ebd5b5aebULL, 0x5b27a46b29926cb2ULL, - 0x40fb3e88ee7f838fULL, 0xed68ecbd7ab6b5d6ULL, - 0xb64f48d65324d964ULL, 0x1bdc9ae3c7edef3dULL, - 0x81f67d11dcff071eULL, 0x2c65af2448363147ULL, - 0x77420b4f61a45df5ULL, 0xdad1d97af56d6bacULL, - 0xc10d439932808491ULL, 0x6c9e91aca649b2c8ULL, - 0x37b935c78fdbde7aULL, 0x9a2ae7f21b12e823ULL, - 0xae7f28162d373865ULL, 0x03ecfa23b9fe0e3cULL, - 0x58cb5e48906c628eULL, 0xf5588c7d04a554d7ULL, - 0xee84169ec348bbeaULL, 0x4317c4ab57818db3ULL, - 0x183060c07e13e101ULL, 0xb5a3b2f5eadad758ULL, - 0x2f895507f1c83f7bULL, 0x821a873265010922ULL, - 0xd93d23594c936590ULL, 0x74aef16cd85a53c9ULL, - 0x6f726b8f1fb7bcf4ULL, 0xc2e1b9ba8b7e8aadULL, - 0x99c61dd1a2ece61fULL, 0x3455cfe43625d046ULL, - 0xf16d8219cea74693ULL, 0x5cfe502c5a6e70caULL, - 0x07d9f44773fc1c78ULL, 0xaa4a2672e7352a21ULL, - 0xb196bc9120d8c51cULL, 0x1c056ea4b411f345ULL, - 0x4722cacf9d839ff7ULL, 0xeab118fa094aa9aeULL, - 0x709bff081258418dULL, 0xdd082d3d869177d4ULL, - 0x862f8956af031b66ULL, 0x2bbc5b633bca2d3fULL, - 0x3060c180fc27c202ULL, 0x9df313b568eef45bULL, - 0xc6d4b7de417c98e9ULL, 0x6b4765ebd5b5aeb0ULL, - 0x5f12aa0fe3907ef6ULL, 0xf281783a775948afULL, - 0xa9a6dc515ecb241dULL, 0x04350e64ca021244ULL, - 0x1fe994870deffd79ULL, 0xb27a46b29926cb20ULL, - 0xe95de2d9b0b4a792ULL, 0x44ce30ec247d91cbULL, - 0xdee4d71e3f6f79e8ULL, 0x7377052baba64fb1ULL, - 0x2850a14082342303ULL, 0x85c3737516fd155aULL, - 0x9e1fe996d110fa67ULL, 0x338c3ba345d9cc3eULL, - 0x68ab9fc86c4ba08cULL, 0xc5384dfdf88296d5ULL, - 0x4f48d6060987bb7fULL, 0xe2db04339d4e8d26ULL, - 0xb9fca058b4dce194ULL, 0x146f726d2015d7cdULL, - 0x0fb3e88ee7f838f0ULL, 0xa2203abb73310ea9ULL, - 0xf9079ed05aa3621bULL, 0x54944ce5ce6a5442ULL, - 0xcebeab17d578bc61ULL, 0x632d792241b18a38ULL, - 0x380add496823e68aULL, 0x95990f7cfcead0d3ULL, - 0x8e45959f3b073feeULL, 0x23d647aaafce09b7ULL, - 0x78f1e3c1865c6505ULL, 0xd56231f41295535cULL, - 0xe137fe1024b0831aULL, 0x4ca42c25b079b543ULL, - 0x1783884e99ebd9f1ULL, 0xba105a7b0d22efa8ULL, - 0xa1ccc098cacf0095ULL, 0x0c5f12ad5e0636ccULL, - 0x5778b6c677945a7eULL, 0xfaeb64f3e35d6c27ULL, - 0x60c18301f84f8404ULL, 0xcd5251346c86b25dULL, - 0x9675f55f4514deefULL, 0x3be6276ad1dde8b6ULL, - 0x203abd891630078bULL, 0x8da96fbc82f931d2ULL, - 0xd68ecbd7ab6b5d60ULL, 0x7b1d19e23fa26b39ULL, - 0xbe25541fc720fdecULL, 0x13b6862a53e9cbb5ULL, - 0x489122417a7ba707ULL, 0xe502f074eeb2915eULL, - 0xfede6a97295f7e63ULL, 0x534db8a2bd96483aULL, - 0x086a1cc994042488ULL, 0xa5f9cefc00cd12d1ULL, - 0x3fd3290e1bdffaf2ULL, 0x9240fb3b8f16ccabULL, - 0xc9675f50a684a019ULL, 0x64f48d65324d9640ULL, - 0x7f281786f5a0797dULL, 0xd2bbc5b361694f24ULL, - 0x899c61d848fb2396ULL, 0x240fb3eddc3215cfULL, - 0x105a7c09ea17c589ULL, 0xbdc9ae3c7edef3d0ULL, - 0xe6ee0a57574c9f62ULL, 0x4b7dd862c385a93bULL, - 0x50a1428104684606ULL, 0xfd3290b490a1705fULL, - 0xa61534dfb9331cedULL, 0x0b86e6ea2dfa2ab4ULL, - 0x91ac011836e8c297ULL, 0x3c3fd32da221f4ceULL, - 0x671877468bb3987cULL, 0xca8ba5731f7aae25ULL, - 0xd1573f90d8974118ULL, 0x7cc4eda54c5e7741ULL, - 0x27e349ce65cc1bf3ULL, 0x8a709bfbf1052daaULL, - 0x9e91ac0c130f76feULL, 0x33027e3987c640a7ULL, - 0x6825da52ae542c15ULL, 0xc5b608673a9d1a4cULL, - 0xde6a9284fd70f571ULL, 0x73f940b169b9c328ULL, - 0x28dee4da402baf9aULL, 0x854d36efd4e299c3ULL, - 0x1f67d11dcff071e0ULL, 0xb2f403285b3947b9ULL, - 0xe9d3a74372ab2b0bULL, 0x44407576e6621d52ULL, - 0x5f9cef95218ff26fULL, 0xf20f3da0b546c436ULL, - 0xa92899cb9cd4a884ULL, 0x04bb4bfe081d9eddULL, - 0x30ee841a3e384e9bULL, 0x9d7d562faaf178c2ULL, - 0xc65af24483631470ULL, 0x6bc9207117aa2229ULL, - 0x7015ba92d047cd14ULL, 0xdd8668a7448efb4dULL, - 0x86a1cccc6d1c97ffULL, 0x2b321ef9f9d5a1a6ULL, - 0xb118f90be2c74985ULL, 0x1c8b2b3e760e7fdcULL, - 0x47ac8f555f9c136eULL, 0xea3f5d60cb552537ULL, - 0xf1e3c7830cb8ca0aULL, 0x5c7015b69871fc53ULL, - 0x0757b1ddb1e390e1ULL, 0xaac463e8252aa6b8ULL, - 0x6ffc2e15dda8306dULL, 0xc26ffc2049610634ULL, - 0x9948584b60f36a86ULL, 0x34db8a7ef43a5cdfULL, - 0x2f07109d33d7b3e2ULL, 0x8294c2a8a71e85bbULL, - 0xd9b366c38e8ce909ULL, 0x7420b4f61a45df50ULL, - 0xee0a530401573773ULL, 0x43998131959e012aULL, - 0x18be255abc0c6d98ULL, 0xb52df76f28c55bc1ULL, - 0xaef16d8cef28b4fcULL, 0x0362bfb97be182a5ULL, - 0x58451bd25273ee17ULL, 0xf5d6c9e7c6bad84eULL, - 0xc1830603f09f0808ULL, 0x6c10d43664563e51ULL, - 0x3737705d4dc452e3ULL, 0x9aa4a268d90d64baULL, - 0x8178388b1ee08b87ULL, 0x2cebeabe8a29bddeULL, - 0x77cc4ed5a3bbd16cULL, 0xda5f9ce03772e735ULL, - 0x40757b122c600f16ULL, 0xede6a927b8a9394fULL, - 0xb6c10d4c913b55fdULL, 0x1b52df7905f263a4ULL, - 0x008e459ac21f8c99ULL, 0xad1d97af56d6bac0ULL, - 0xf63a33c47f44d672ULL, 0x5ba9e1f1eb8de02bULL, - 0xd1d97a0a1a88cd81ULL, 0x7c4aa83f8e41fbd8ULL, - 0x276d0c54a7d3976aULL, 0x8afede61331aa133ULL, - 0x91224482f4f74e0eULL, 0x3cb196b7603e7857ULL, - 0x679632dc49ac14e5ULL, 0xca05e0e9dd6522bcULL, - 0x502f071bc677ca9fULL, 0xfdbcd52e52befcc6ULL, - 0xa69b71457b2c9074ULL, 0x0b08a370efe5a62dULL, - 0x10d4399328084910ULL, 0xbd47eba6bcc17f49ULL, - 0xe6604fcd955313fbULL, 0x4bf39df8019a25a2ULL, - 0x7fa6521c37bff5e4ULL, 0xd2358029a376c3bdULL, - 0x891224428ae4af0fULL, 0x2481f6771e2d9956ULL, - 0x3f5d6c94d9c0766bULL, 0x92cebea14d094032ULL, - 0xc9e91aca649b2c80ULL, 0x647ac8fff0521ad9ULL, - 0xfe502f0deb40f2faULL, 0x53c3fd387f89c4a3ULL, - 0x08e45953561ba811ULL, 0xa5778b66c2d29e48ULL, - 0xbeab1185053f7175ULL, 0x1338c3b091f6472cULL, - 0x481f67dbb8642b9eULL, 0xe58cb5ee2cad1dc7ULL, - 0x20b4f813d42f8b12ULL, 0x8d272a2640e6bd4bULL, - 0xd6008e4d6974d1f9ULL, 0x7b935c78fdbde7a0ULL, - 0x604fc69b3a50089dULL, 0xcddc14aeae993ec4ULL, - 0x96fbb0c5870b5276ULL, 0x3b6862f013c2642fULL, - 0xa142850208d08c0cULL, 0x0cd157379c19ba55ULL, - 0x57f6f35cb58bd6e7ULL, 0xfa6521692142e0beULL, - 0xe1b9bb8ae6af0f83ULL, 0x4c2a69bf726639daULL, - 0x170dcdd45bf45568ULL, 0xba9e1fe1cf3d6331ULL, - 0x8ecbd005f918b377ULL, 0x235802306dd1852eULL, - 0x787fa65b4443e99cULL, 0xd5ec746ed08adfc5ULL, - 0xce30ee8d176730f8ULL, 0x63a33cb883ae06a1ULL, - 0x388498d3aa3c6a13ULL, 0x95174ae63ef55c4aULL, - 0x0f3dad1425e7b469ULL, 0xa2ae7f21b12e8230ULL, - 0xf989db4a98bcee82ULL, 0x541a097f0c75d8dbULL, - 0x4fc6939ccb9837e6ULL, 0xe25541a95f5101bfULL, - 0xb972e5c276c36d0dULL, 0x14e137f7e20a5b54ULL + 0x0000000000000000ULL, 0xad93d23594c93659ULL, 0xf6b4765ebd5b5aebULL, 0x5b27a46b29926cb2ULL, + 0x40fb3e88ee7f838fULL, 0xed68ecbd7ab6b5d6ULL, 0xb64f48d65324d964ULL, 0x1bdc9ae3c7edef3dULL, + 0x81f67d11dcff071eULL, 0x2c65af2448363147ULL, 0x77420b4f61a45df5ULL, 0xdad1d97af56d6bacULL, + 0xc10d439932808491ULL, 0x6c9e91aca649b2c8ULL, 0x37b935c78fdbde7aULL, 0x9a2ae7f21b12e823ULL, + 0xae7f28162d373865ULL, 0x03ecfa23b9fe0e3cULL, 0x58cb5e48906c628eULL, 0xf5588c7d04a554d7ULL, + 0xee84169ec348bbeaULL, 0x4317c4ab57818db3ULL, 0x183060c07e13e101ULL, 0xb5a3b2f5eadad758ULL, + 0x2f895507f1c83f7bULL, 0x821a873265010922ULL, 0xd93d23594c936590ULL, 0x74aef16cd85a53c9ULL, + 0x6f726b8f1fb7bcf4ULL, 0xc2e1b9ba8b7e8aadULL, 0x99c61dd1a2ece61fULL, 0x3455cfe43625d046ULL, + 0xf16d8219cea74693ULL, 0x5cfe502c5a6e70caULL, 0x07d9f44773fc1c78ULL, 0xaa4a2672e7352a21ULL, + 0xb196bc9120d8c51cULL, 0x1c056ea4b411f345ULL, 0x4722cacf9d839ff7ULL, 0xeab118fa094aa9aeULL, + 0x709bff081258418dULL, 0xdd082d3d869177d4ULL, 0x862f8956af031b66ULL, 0x2bbc5b633bca2d3fULL, + 0x3060c180fc27c202ULL, 0x9df313b568eef45bULL, 0xc6d4b7de417c98e9ULL, 0x6b4765ebd5b5aeb0ULL, + 0x5f12aa0fe3907ef6ULL, 0xf281783a775948afULL, 0xa9a6dc515ecb241dULL, 0x04350e64ca021244ULL, + 0x1fe994870deffd79ULL, 0xb27a46b29926cb20ULL, 0xe95de2d9b0b4a792ULL, 0x44ce30ec247d91cbULL, + 0xdee4d71e3f6f79e8ULL, 0x7377052baba64fb1ULL, 0x2850a14082342303ULL, 0x85c3737516fd155aULL, + 0x9e1fe996d110fa67ULL, 0x338c3ba345d9cc3eULL, 0x68ab9fc86c4ba08cULL, 0xc5384dfdf88296d5ULL, + 0x4f48d6060987bb7fULL, 0xe2db04339d4e8d26ULL, 0xb9fca058b4dce194ULL, 0x146f726d2015d7cdULL, + 0x0fb3e88ee7f838f0ULL, 0xa2203abb73310ea9ULL, 0xf9079ed05aa3621bULL, 0x54944ce5ce6a5442ULL, + 0xcebeab17d578bc61ULL, 0x632d792241b18a38ULL, 0x380add496823e68aULL, 0x95990f7cfcead0d3ULL, + 0x8e45959f3b073feeULL, 0x23d647aaafce09b7ULL, 0x78f1e3c1865c6505ULL, 0xd56231f41295535cULL, + 0xe137fe1024b0831aULL, 0x4ca42c25b079b543ULL, 0x1783884e99ebd9f1ULL, 0xba105a7b0d22efa8ULL, + 0xa1ccc098cacf0095ULL, 0x0c5f12ad5e0636ccULL, 0x5778b6c677945a7eULL, 0xfaeb64f3e35d6c27ULL, + 0x60c18301f84f8404ULL, 0xcd5251346c86b25dULL, 0x9675f55f4514deefULL, 0x3be6276ad1dde8b6ULL, + 0x203abd891630078bULL, 0x8da96fbc82f931d2ULL, 0xd68ecbd7ab6b5d60ULL, 0x7b1d19e23fa26b39ULL, + 0xbe25541fc720fdecULL, 0x13b6862a53e9cbb5ULL, 0x489122417a7ba707ULL, 0xe502f074eeb2915eULL, + 0xfede6a97295f7e63ULL, 0x534db8a2bd96483aULL, 0x086a1cc994042488ULL, 0xa5f9cefc00cd12d1ULL, + 0x3fd3290e1bdffaf2ULL, 0x9240fb3b8f16ccabULL, 0xc9675f50a684a019ULL, 0x64f48d65324d9640ULL, + 0x7f281786f5a0797dULL, 0xd2bbc5b361694f24ULL, 0x899c61d848fb2396ULL, 0x240fb3eddc3215cfULL, + 0x105a7c09ea17c589ULL, 0xbdc9ae3c7edef3d0ULL, 0xe6ee0a57574c9f62ULL, 0x4b7dd862c385a93bULL, + 0x50a1428104684606ULL, 0xfd3290b490a1705fULL, 0xa61534dfb9331cedULL, 0x0b86e6ea2dfa2ab4ULL, + 0x91ac011836e8c297ULL, 0x3c3fd32da221f4ceULL, 0x671877468bb3987cULL, 0xca8ba5731f7aae25ULL, + 0xd1573f90d8974118ULL, 0x7cc4eda54c5e7741ULL, 0x27e349ce65cc1bf3ULL, 0x8a709bfbf1052daaULL, + 0x9e91ac0c130f76feULL, 0x33027e3987c640a7ULL, 0x6825da52ae542c15ULL, 0xc5b608673a9d1a4cULL, + 0xde6a9284fd70f571ULL, 0x73f940b169b9c328ULL, 0x28dee4da402baf9aULL, 0x854d36efd4e299c3ULL, + 0x1f67d11dcff071e0ULL, 0xb2f403285b3947b9ULL, 0xe9d3a74372ab2b0bULL, 0x44407576e6621d52ULL, + 0x5f9cef95218ff26fULL, 0xf20f3da0b546c436ULL, 0xa92899cb9cd4a884ULL, 0x04bb4bfe081d9eddULL, + 0x30ee841a3e384e9bULL, 0x9d7d562faaf178c2ULL, 0xc65af24483631470ULL, 0x6bc9207117aa2229ULL, + 0x7015ba92d047cd14ULL, 0xdd8668a7448efb4dULL, 0x86a1cccc6d1c97ffULL, 0x2b321ef9f9d5a1a6ULL, + 0xb118f90be2c74985ULL, 0x1c8b2b3e760e7fdcULL, 0x47ac8f555f9c136eULL, 0xea3f5d60cb552537ULL, + 0xf1e3c7830cb8ca0aULL, 0x5c7015b69871fc53ULL, 0x0757b1ddb1e390e1ULL, 0xaac463e8252aa6b8ULL, + 0x6ffc2e15dda8306dULL, 0xc26ffc2049610634ULL, 0x9948584b60f36a86ULL, 0x34db8a7ef43a5cdfULL, + 0x2f07109d33d7b3e2ULL, 0x8294c2a8a71e85bbULL, 0xd9b366c38e8ce909ULL, 0x7420b4f61a45df50ULL, + 0xee0a530401573773ULL, 0x43998131959e012aULL, 0x18be255abc0c6d98ULL, 0xb52df76f28c55bc1ULL, + 0xaef16d8cef28b4fcULL, 0x0362bfb97be182a5ULL, 0x58451bd25273ee17ULL, 0xf5d6c9e7c6bad84eULL, + 0xc1830603f09f0808ULL, 0x6c10d43664563e51ULL, 0x3737705d4dc452e3ULL, 0x9aa4a268d90d64baULL, + 0x8178388b1ee08b87ULL, 0x2cebeabe8a29bddeULL, 0x77cc4ed5a3bbd16cULL, 0xda5f9ce03772e735ULL, + 0x40757b122c600f16ULL, 0xede6a927b8a9394fULL, 0xb6c10d4c913b55fdULL, 0x1b52df7905f263a4ULL, + 0x008e459ac21f8c99ULL, 0xad1d97af56d6bac0ULL, 0xf63a33c47f44d672ULL, 0x5ba9e1f1eb8de02bULL, + 0xd1d97a0a1a88cd81ULL, 0x7c4aa83f8e41fbd8ULL, 0x276d0c54a7d3976aULL, 0x8afede61331aa133ULL, + 0x91224482f4f74e0eULL, 0x3cb196b7603e7857ULL, 0x679632dc49ac14e5ULL, 0xca05e0e9dd6522bcULL, + 0x502f071bc677ca9fULL, 0xfdbcd52e52befcc6ULL, 0xa69b71457b2c9074ULL, 0x0b08a370efe5a62dULL, + 0x10d4399328084910ULL, 0xbd47eba6bcc17f49ULL, 0xe6604fcd955313fbULL, 0x4bf39df8019a25a2ULL, + 0x7fa6521c37bff5e4ULL, 0xd2358029a376c3bdULL, 0x891224428ae4af0fULL, 0x2481f6771e2d9956ULL, + 0x3f5d6c94d9c0766bULL, 0x92cebea14d094032ULL, 0xc9e91aca649b2c80ULL, 0x647ac8fff0521ad9ULL, + 0xfe502f0deb40f2faULL, 0x53c3fd387f89c4a3ULL, 0x08e45953561ba811ULL, 0xa5778b66c2d29e48ULL, + 0xbeab1185053f7175ULL, 0x1338c3b091f6472cULL, 0x481f67dbb8642b9eULL, 0xe58cb5ee2cad1dc7ULL, + 0x20b4f813d42f8b12ULL, 0x8d272a2640e6bd4bULL, 0xd6008e4d6974d1f9ULL, 0x7b935c78fdbde7a0ULL, + 0x604fc69b3a50089dULL, 0xcddc14aeae993ec4ULL, 0x96fbb0c5870b5276ULL, 0x3b6862f013c2642fULL, + 0xa142850208d08c0cULL, 0x0cd157379c19ba55ULL, 0x57f6f35cb58bd6e7ULL, 0xfa6521692142e0beULL, + 0xe1b9bb8ae6af0f83ULL, 0x4c2a69bf726639daULL, 0x170dcdd45bf45568ULL, 0xba9e1fe1cf3d6331ULL, + 0x8ecbd005f918b377ULL, 0x235802306dd1852eULL, 0x787fa65b4443e99cULL, 0xd5ec746ed08adfc5ULL, + 0xce30ee8d176730f8ULL, 0x63a33cb883ae06a1ULL, 0x388498d3aa3c6a13ULL, 0x95174ae63ef55c4aULL, + 0x0f3dad1425e7b469ULL, 0xa2ae7f21b12e8230ULL, 0xf989db4a98bcee82ULL, 0x541a097f0c75d8dbULL, + 0x4fc6939ccb9837e6ULL, 0xe25541a95f5101bfULL, 0xb972e5c276c36d0dULL, 0x14e137f7e20a5b54ULL }; -uint64_t crc64_ecma_refl_base(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_ecma_refl_base(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t i, crc = ~seed; + uint64_t i, crc = ~seed; - for (i = 0; i < len; i++) { - uint8_t byte = buf[i]; - crc = crc64_ecma_refl_table[(uint8_t) crc ^ byte] ^ (crc >> 8); - } + for (i = 0; i < len; i++) { + uint8_t byte = buf[i]; + crc = crc64_ecma_refl_table[(uint8_t) crc ^ byte] ^ (crc >> 8); + } - return ~crc; + return ~crc; } -uint64_t crc64_ecma_norm_base(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_ecma_norm_base(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t i, crc = ~seed; + uint64_t i, crc = ~seed; - for (i = 0; i < len; i++) { - uint8_t byte = buf[i]; - crc = crc64_ecma_norm_table[((crc >> 56) ^ byte) & 0xff] ^ (crc << 8); - } + for (i = 0; i < len; i++) { + uint8_t byte = buf[i]; + crc = crc64_ecma_norm_table[((crc >> 56) ^ byte) & 0xff] ^ (crc << 8); + } - return ~crc; + return ~crc; } -uint64_t crc64_iso_refl_base(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_iso_refl_base(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t i, crc = ~seed; + uint64_t i, crc = ~seed; - for (i = 0; i < len; i++) { - uint8_t byte = buf[i]; - crc = crc64_iso_refl_table[(uint8_t) crc ^ byte] ^ (crc >> 8); - } + for (i = 0; i < len; i++) { + uint8_t byte = buf[i]; + crc = crc64_iso_refl_table[(uint8_t) crc ^ byte] ^ (crc >> 8); + } - return ~crc; + return ~crc; } -uint64_t crc64_iso_norm_base(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_iso_norm_base(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t i, crc = ~seed; + uint64_t i, crc = ~seed; - for (i = 0; i < len; i++) { - uint8_t byte = buf[i]; - crc = crc64_iso_norm_table[((crc >> 56) ^ byte) & 0xff] ^ (crc << 8); - } + for (i = 0; i < len; i++) { + uint8_t byte = buf[i]; + crc = crc64_iso_norm_table[((crc >> 56) ^ byte) & 0xff] ^ (crc << 8); + } - return ~crc; + return ~crc; } -uint64_t crc64_jones_refl_base(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_jones_refl_base(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t i, crc = ~seed; + uint64_t i, crc = ~seed; - for (i = 0; i < len; i++) { - uint8_t byte = buf[i]; - crc = crc64_jones_refl_table[(uint8_t) crc ^ byte] ^ (crc >> 8); - } + for (i = 0; i < len; i++) { + uint8_t byte = buf[i]; + crc = crc64_jones_refl_table[(uint8_t) crc ^ byte] ^ (crc >> 8); + } - return ~crc; + return ~crc; } -uint64_t crc64_jones_norm_base(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_jones_norm_base(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t i, crc = ~seed; + uint64_t i, crc = ~seed; - for (i = 0; i < len; i++) { - uint8_t byte = buf[i]; - crc = crc64_jones_norm_table[((crc >> 56) ^ byte) & 0xff] ^ (crc << 8); - } + for (i = 0; i < len; i++) { + uint8_t byte = buf[i]; + crc = crc64_jones_norm_table[((crc >> 56) ^ byte) & 0xff] ^ (crc << 8); + } - return ~crc; + return ~crc; } -uint64_t crc64_rocksoft_refl_base(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_rocksoft_refl_base(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t i, crc = ~seed; + uint64_t i, crc = ~seed; - for (i = 0; i < len; i++) { - uint8_t byte = buf[i]; - crc = crc64_rocksoft_refl_table[(uint8_t) crc ^ byte] ^ (crc >> 8); - } + for (i = 0; i < len; i++) { + uint8_t byte = buf[i]; + crc = crc64_rocksoft_refl_table[(uint8_t) crc ^ byte] ^ (crc >> 8); + } - return ~crc; + return ~crc; } -uint64_t crc64_rocksoft_norm_base(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_rocksoft_norm_base(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t i, crc = ~seed; + uint64_t i, crc = ~seed; - for (i = 0; i < len; i++) { - uint8_t byte = buf[i]; - crc = crc64_rocksoft_norm_table[((crc >> 56) ^ byte) & 0xff] ^ (crc << 8); - } + for (i = 0; i < len; i++) { + uint8_t byte = buf[i]; + crc = crc64_rocksoft_norm_table[((crc >> 56) ^ byte) & 0xff] ^ (crc << 8); + } - return ~crc; + return ~crc; } diff --git a/crc/crc64_example.c b/crc/crc64_example.c index 832d04c..cc2b530 100644 --- a/crc/crc64_example.c +++ b/crc/crc64_example.c @@ -32,39 +32,40 @@ #include #include "crc64.h" -#define BUF_SIZE 8192 +#define BUF_SIZE 8192 #define INIT_SEED 0x12345678 -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - uint8_t inbuf[BUF_SIZE]; - uint64_t avail_in, total_in = 0; - uint64_t crc64_checksum; - FILE *in; + uint8_t inbuf[BUF_SIZE]; + uint64_t avail_in, total_in = 0; + uint64_t crc64_checksum; + FILE *in; - if (argc != 2) { - fprintf(stderr, "Usage: crc64_example infile\n"); - exit(0); - } - in = fopen(argv[1], "rb"); - if (!in) { - fprintf(stderr, "Can't open %s for reading\n", argv[1]); - exit(0); - } + if (argc != 2) { + fprintf(stderr, "Usage: crc64_example infile\n"); + exit(0); + } + in = fopen(argv[1], "rb"); + if (!in) { + fprintf(stderr, "Can't open %s for reading\n", argv[1]); + exit(0); + } - printf("crc64_example -- crc64_ecma_refl:\n"); - fflush(0); + printf("crc64_example -- crc64_ecma_refl:\n"); + fflush(0); - crc64_checksum = INIT_SEED; - while ((avail_in = fread(inbuf, 1, BUF_SIZE, in))) { - // crc update mode - crc64_checksum = crc64_ecma_refl(crc64_checksum, inbuf, avail_in); - total_in += avail_in; - } + crc64_checksum = INIT_SEED; + while ((avail_in = fread(inbuf, 1, BUF_SIZE, in))) { + // crc update mode + crc64_checksum = crc64_ecma_refl(crc64_checksum, inbuf, avail_in); + total_in += avail_in; + } - fclose(in); - printf("total length is %" PRIu64 ", checksum is 0x%" PRIx64 "\n", total_in, - crc64_checksum); + fclose(in); + printf("total length is %" PRIu64 ", checksum is 0x%" PRIx64 "\n", total_in, + crc64_checksum); - return 0; + return 0; } diff --git a/crc/crc64_funcs_perf.c b/crc/crc64_funcs_perf.c index 78f2d41..91c8f7c 100644 --- a/crc/crc64_funcs_perf.c +++ b/crc/crc64_funcs_perf.c @@ -37,72 +37,73 @@ #include "test.h" #ifndef GT_L3_CACHE -# define GT_L3_CACHE 32*1024*1024 /* some number > last level cache */ +#define GT_L3_CACHE 32 * 1024 * 1024 /* some number > last level cache */ #endif #if !defined(COLD_TEST) && !defined(TEST_CUSTOM) // Cached test, loop many times over small dataset -# define TEST_LEN 8*1024 -# define TEST_TYPE_STR "_warm" -#elif defined (COLD_TEST) +#define TEST_LEN 8 * 1024 +#define TEST_TYPE_STR "_warm" +#elif defined(COLD_TEST) // Uncached test. Pull from large mem base. -# define TEST_LEN (2 * GT_L3_CACHE) -# define TEST_TYPE_STR "_cold" +#define TEST_LEN (2 * GT_L3_CACHE) +#define TEST_TYPE_STR "_cold" #endif #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif #define TEST_MEM TEST_LEN -typedef uint64_t(*crc64_func_t) (uint64_t, const uint8_t *, uint64_t); +typedef uint64_t (*crc64_func_t)(uint64_t, const uint8_t *, uint64_t); typedef struct func_case { - char *note; - crc64_func_t crc64_func_call; - crc64_func_t crc64_ref_call; + char *note; + crc64_func_t crc64_func_call; + crc64_func_t crc64_ref_call; } func_case_t; func_case_t test_funcs[] = { - {"crc64_ecma_norm", crc64_ecma_norm, crc64_ecma_norm_base}, - {"crc64_ecma_refl", crc64_ecma_refl, crc64_ecma_refl_base}, - {"crc64_iso_norm", crc64_iso_norm, crc64_iso_norm_base}, - {"crc64_iso_refl", crc64_iso_refl, crc64_iso_refl_base}, - {"crc64_jones_norm", crc64_jones_norm, crc64_jones_norm_base}, - {"crc64_jones_refl", crc64_jones_refl, crc64_jones_refl_base}, - {"crc64_rocksoft_norm", crc64_rocksoft_norm, crc64_rocksoft_norm_base}, - {"crc64_rocksoft_refl", crc64_rocksoft_refl, crc64_rocksoft_refl_base} + { "crc64_ecma_norm", crc64_ecma_norm, crc64_ecma_norm_base }, + { "crc64_ecma_refl", crc64_ecma_refl, crc64_ecma_refl_base }, + { "crc64_iso_norm", crc64_iso_norm, crc64_iso_norm_base }, + { "crc64_iso_refl", crc64_iso_refl, crc64_iso_refl_base }, + { "crc64_jones_norm", crc64_jones_norm, crc64_jones_norm_base }, + { "crc64_jones_refl", crc64_jones_refl, crc64_jones_refl_base }, + { "crc64_rocksoft_norm", crc64_rocksoft_norm, crc64_rocksoft_norm_base }, + { "crc64_rocksoft_refl", crc64_rocksoft_refl, crc64_rocksoft_refl_base } }; -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - int j; - void *buf; - uint64_t crc; - struct perf start; - func_case_t *test_func; + int j; + void *buf; + uint64_t crc; + struct perf start; + func_case_t *test_func; - if (posix_memalign(&buf, 1024, TEST_LEN)) { - printf("alloc error: Fail"); - return -1; - } - memset(buf, (char)TEST_SEED, TEST_LEN); + if (posix_memalign(&buf, 1024, TEST_LEN)) { + printf("alloc error: Fail"); + return -1; + } + memset(buf, (char) TEST_SEED, TEST_LEN); - for (j = 0; j < sizeof(test_funcs) / sizeof(test_funcs[0]); j++) { - test_func = &test_funcs[j]; - printf("%s_perf:\n", test_func->note); + for (j = 0; j < sizeof(test_funcs) / sizeof(test_funcs[0]); j++) { + test_func = &test_funcs[j]; + printf("%s_perf:\n", test_func->note); - printf("Start timed tests\n"); - fflush(0); + printf("Start timed tests\n"); + fflush(0); - BENCHMARK(&start, BENCHMARK_TIME, crc = - test_func->crc64_func_call(TEST_SEED, buf, TEST_LEN)); - printf("%s" TEST_TYPE_STR ": ", test_func->note); - perf_print(start, (long long)TEST_LEN); + BENCHMARK(&start, BENCHMARK_TIME, + crc = test_func->crc64_func_call(TEST_SEED, buf, TEST_LEN)); + printf("%s" TEST_TYPE_STR ": ", test_func->note); + perf_print(start, (long long) TEST_LEN); - printf("finish 0x%" PRIx64 "\n", crc); - } + printf("finish 0x%" PRIx64 "\n", crc); + } - return 0; + return 0; } diff --git a/crc/crc64_funcs_test.c b/crc/crc64_funcs_test.c index ee1e695..cd75613 100644 --- a/crc/crc64_funcs_test.c +++ b/crc/crc64_funcs_test.c @@ -38,302 +38,314 @@ #include "test.h" #ifndef TEST_SEED -# define TEST_SEED 0x1234 +#define TEST_SEED 0x1234 #endif #define MAX_BUF 4096 -#define TEST_SIZE 32 +#define TEST_SIZE 32 typedef uint64_t u64; typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; -typedef uint64_t(*crc64_func_t) (uint64_t, const uint8_t *, uint64_t); +typedef uint64_t (*crc64_func_t)(uint64_t, const uint8_t *, uint64_t); typedef struct func_case { - char *note; - crc64_func_t crc64_func_call; - crc64_func_t crc64_base_call; - crc64_func_t crc64_ref_call; + char *note; + crc64_func_t crc64_func_call; + crc64_func_t crc64_base_call; + crc64_func_t crc64_ref_call; } func_case_t; func_case_t test_funcs[] = { - {"crc64_ecma_norm", crc64_ecma_norm, crc64_ecma_norm_base, crc64_ecma_norm_ref}, - {"crc64_ecma_refl", crc64_ecma_refl, crc64_ecma_refl_base, crc64_ecma_refl_ref}, - {"crc64_iso_norm", crc64_iso_norm, crc64_iso_norm_base, crc64_iso_norm_ref}, - {"crc64_iso_refl", crc64_iso_refl, crc64_iso_refl_base, crc64_iso_refl_ref}, - {"crc64_jones_norm", crc64_jones_norm, crc64_jones_norm_base, - crc64_jones_norm_ref}, - {"crc64_jones_refl", crc64_jones_refl, crc64_jones_refl_base, crc64_jones_refl_ref}, - {"crc64_rocksoft_norm", crc64_rocksoft_norm, crc64_rocksoft_norm_base, - crc64_rocksoft_norm_ref}, - {"crc64_rocksoft_refl", crc64_rocksoft_refl, crc64_rocksoft_refl_base, - crc64_rocksoft_refl_ref} + { "crc64_ecma_norm", crc64_ecma_norm, crc64_ecma_norm_base, crc64_ecma_norm_ref }, + { "crc64_ecma_refl", crc64_ecma_refl, crc64_ecma_refl_base, crc64_ecma_refl_ref }, + { "crc64_iso_norm", crc64_iso_norm, crc64_iso_norm_base, crc64_iso_norm_ref }, + { "crc64_iso_refl", crc64_iso_refl, crc64_iso_refl_base, crc64_iso_refl_ref }, + { "crc64_jones_norm", crc64_jones_norm, crc64_jones_norm_base, crc64_jones_norm_ref }, + { "crc64_jones_refl", crc64_jones_refl, crc64_jones_refl_base, crc64_jones_refl_ref }, + { "crc64_rocksoft_norm", crc64_rocksoft_norm, crc64_rocksoft_norm_base, + crc64_rocksoft_norm_ref }, + { "crc64_rocksoft_refl", crc64_rocksoft_refl, crc64_rocksoft_refl_base, + crc64_rocksoft_refl_ref } }; // Generates pseudo-random data -void rand_buffer(unsigned char *buf, long buffer_size) +void +rand_buffer(unsigned char *buf, long buffer_size) { - long i; - for (i = 0; i < buffer_size; i++) - buf[i] = rand(); + long i; + for (i = 0; i < buffer_size; i++) + buf[i] = rand(); } // Test cases -int zeros_test(func_case_t * test_func); +int +zeros_test(func_case_t *test_func); -int simple_pattern_test(func_case_t * test_func); +int +simple_pattern_test(func_case_t *test_func); -int seeds_sizes_test(func_case_t * test_func); +int +seeds_sizes_test(func_case_t *test_func); -int eob_test(func_case_t * test_func); +int +eob_test(func_case_t *test_func); -int update_test(func_case_t * test_func); +int +update_test(func_case_t *test_func); void *buf_alloc = NULL; -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - int fail = 0, fail_case; - int i, ret; - func_case_t *test_func; + int fail = 0, fail_case; + int i, ret; + func_case_t *test_func; - // Align to 32B boundary - ret = posix_memalign(&buf_alloc, TEST_SIZE, MAX_BUF * TEST_SIZE); - if (ret) { - printf("alloc error: Fail"); - return -1; - } - srand(TEST_SEED); - printf("CRC64 Tests\n"); + // Align to 32B boundary + ret = posix_memalign(&buf_alloc, TEST_SIZE, MAX_BUF * TEST_SIZE); + if (ret) { + printf("alloc error: Fail"); + return -1; + } + srand(TEST_SEED); + printf("CRC64 Tests\n"); - for (i = 0; i < sizeof(test_funcs) / sizeof(test_funcs[0]); i++) { - fail_case = 0; - test_func = &test_funcs[i]; + for (i = 0; i < sizeof(test_funcs) / sizeof(test_funcs[0]); i++) { + fail_case = 0; + test_func = &test_funcs[i]; - printf("Test %s\t", test_func->note); - fail_case += zeros_test(test_func); - fail_case += simple_pattern_test(test_func); - fail_case += seeds_sizes_test(test_func); - fail_case += eob_test(test_func); - fail_case += update_test(test_func); - printf(" done: %s\n", fail_case ? "Fail" : "Pass"); + printf("Test %s\t", test_func->note); + fail_case += zeros_test(test_func); + fail_case += simple_pattern_test(test_func); + fail_case += seeds_sizes_test(test_func); + fail_case += eob_test(test_func); + fail_case += update_test(test_func); + printf(" done: %s\n", fail_case ? "Fail" : "Pass"); - if (fail_case) { - printf("\n%s Failed %d tests\n", test_func->note, fail_case); - fail++; - } - } + if (fail_case) { + printf("\n%s Failed %d tests\n", test_func->note, fail_case); + fail++; + } + } - printf("CRC64 Tests all done: %s\n", fail ? "Fail" : "Pass"); + printf("CRC64 Tests all done: %s\n", fail ? "Fail" : "Pass"); - aligned_free(buf_alloc); + aligned_free(buf_alloc); - return fail; + return fail; } // Test of all zeros -int zeros_test(func_case_t * test_func) +int +zeros_test(func_case_t *test_func) { - uint64_t crc_ref, crc_base, crc; - int fail = 0; - unsigned char *buf = NULL; + uint64_t crc_ref, crc_base, crc; + int fail = 0; + unsigned char *buf = NULL; - buf = (unsigned char *)buf_alloc; - memset(buf, 0, MAX_BUF * 10); - crc_ref = test_func->crc64_ref_call(TEST_SEED, buf, MAX_BUF * 10); - crc_base = test_func->crc64_base_call(TEST_SEED, buf, MAX_BUF * 10); - crc = test_func->crc64_func_call(TEST_SEED, buf, MAX_BUF * 10); + buf = (unsigned char *) buf_alloc; + memset(buf, 0, MAX_BUF * 10); + crc_ref = test_func->crc64_ref_call(TEST_SEED, buf, MAX_BUF * 10); + crc_base = test_func->crc64_base_call(TEST_SEED, buf, MAX_BUF * 10); + crc = test_func->crc64_func_call(TEST_SEED, buf, MAX_BUF * 10); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("\n opt ref\n"); - printf(" ------ ------\n"); - printf("fail crc zero = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n", - crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("\n opt ref\n"); + printf(" ------ ------\n"); + printf("fail crc zero = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n", + crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else - printf("."); + else + printf("."); #endif - return fail; + return fail; } // Another simple test pattern -int simple_pattern_test(func_case_t * test_func) +int +simple_pattern_test(func_case_t *test_func) { - uint64_t crc_ref, crc_base, crc; - int fail = 0; - unsigned char *buf = NULL; + uint64_t crc_ref, crc_base, crc; + int fail = 0; + unsigned char *buf = NULL; - buf = (unsigned char *)buf_alloc; - memset(buf, 0x8a, MAX_BUF); - crc_ref = test_func->crc64_ref_call(TEST_SEED, buf, MAX_BUF); - crc_base = test_func->crc64_base_call(TEST_SEED, buf, MAX_BUF); - crc = test_func->crc64_func_call(TEST_SEED, buf, MAX_BUF); + buf = (unsigned char *) buf_alloc; + memset(buf, 0x8a, MAX_BUF); + crc_ref = test_func->crc64_ref_call(TEST_SEED, buf, MAX_BUF); + crc_base = test_func->crc64_base_call(TEST_SEED, buf, MAX_BUF); + crc = test_func->crc64_func_call(TEST_SEED, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc all 8a = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n", - crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc all 8a = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n", crc_ref, + crc_base, crc); + } #ifdef TEST_VERBOSE - else - printf("."); + else + printf("."); #endif - return fail; + return fail; } -int seeds_sizes_test(func_case_t * test_func) +int +seeds_sizes_test(func_case_t *test_func) { - uint64_t crc_ref, crc_base, crc; - int fail = 0; - int i; - uint64_t r, s; - unsigned char *buf = NULL; + uint64_t crc_ref, crc_base, crc; + int fail = 0; + int i; + uint64_t r, s; + unsigned char *buf = NULL; - // Do a few random tests - buf = (unsigned char *)buf_alloc; //reset buf - r = rand(); - rand_buffer(buf, MAX_BUF * TEST_SIZE); + // Do a few random tests + buf = (unsigned char *) buf_alloc; // reset buf + r = rand(); + rand_buffer(buf, MAX_BUF * TEST_SIZE); - for (i = 0; i < TEST_SIZE; i++) { - crc_ref = test_func->crc64_ref_call(r, buf, MAX_BUF); - crc_base = test_func->crc64_base_call(r, buf, MAX_BUF); - crc = test_func->crc64_func_call(r, buf, MAX_BUF); + for (i = 0; i < TEST_SIZE; i++) { + crc_ref = test_func->crc64_ref_call(r, buf, MAX_BUF); + crc_base = test_func->crc64_base_call(r, buf, MAX_BUF); + crc = test_func->crc64_func_call(r, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc rand%3d = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 - "\n", i, crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc rand%3d = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n", i, + crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (TEST_SIZE / 8) == 0) - printf("."); + else if (i % (TEST_SIZE / 8) == 0) + printf("."); #endif - buf += MAX_BUF; - } + buf += MAX_BUF; + } - // Do a few random sizes - buf = (unsigned char *)buf_alloc; //reset buf - r = rand(); + // Do a few random sizes + buf = (unsigned char *) buf_alloc; // reset buf + r = rand(); - for (i = MAX_BUF; i >= 0; i--) { - crc_ref = test_func->crc64_ref_call(r, buf, i); - crc_base = test_func->crc64_base_call(r, buf, i); - crc = test_func->crc64_func_call(r, buf, i); + for (i = MAX_BUF; i >= 0; i--) { + crc_ref = test_func->crc64_ref_call(r, buf, i); + crc_base = test_func->crc64_base_call(r, buf, i); + crc = test_func->crc64_func_call(r, buf, i); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail random size %d 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 - "\n", i, crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail random size %d 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n", i, + crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (MAX_BUF / 8) == 0) - printf("."); + else if (i % (MAX_BUF / 8) == 0) + printf("."); #endif - } + } - // Try different seeds - for (s = 0; s < 20; s++) { - buf = (unsigned char *)buf_alloc; //reset buf + // Try different seeds + for (s = 0; s < 20; s++) { + buf = (unsigned char *) buf_alloc; // reset buf - r = rand(); // just to get a new seed - rand_buffer(buf, MAX_BUF * TEST_SIZE); // new pseudo-rand data + r = rand(); // just to get a new seed + rand_buffer(buf, MAX_BUF * TEST_SIZE); // new pseudo-rand data #ifdef TEST_VERBOSE - printf("seed = 0x%lx\n", r); + printf("seed = 0x%lx\n", r); #endif - for (i = 0; i < TEST_SIZE; i++) { - crc_ref = test_func->crc64_ref_call(r, buf, MAX_BUF); - crc_base = test_func->crc64_base_call(r, buf, MAX_BUF); - crc = test_func->crc64_func_call(r, buf, MAX_BUF); + for (i = 0; i < TEST_SIZE; i++) { + crc_ref = test_func->crc64_ref_call(r, buf, MAX_BUF); + crc_base = test_func->crc64_base_call(r, buf, MAX_BUF); + crc = test_func->crc64_func_call(r, buf, MAX_BUF); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc rand%3d = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" - PRIx64 "\n", i, crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc rand%3d = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 + "\n", + i, crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (TEST_SIZE * 20 / 8) == 0) - printf("."); + else if (i % (TEST_SIZE * 20 / 8) == 0) + printf("."); #endif - buf += MAX_BUF; - } - } + buf += MAX_BUF; + } + } - return fail; + return fail; } // Run tests at end of buffer -int eob_test(func_case_t * test_func) +int +eob_test(func_case_t *test_func) { - uint64_t crc_ref, crc_base, crc; - int fail = 0; - int i; - unsigned char *buf = NULL; + uint64_t crc_ref, crc_base, crc; + int fail = 0; + int i; + unsigned char *buf = NULL; - // Null test - if (0 != test_func->crc64_func_call(0, NULL, 0)) { - fail++; - printf("crc null test fail\n"); - } + // Null test + if (0 != test_func->crc64_func_call(0, NULL, 0)) { + fail++; + printf("crc null test fail\n"); + } - buf = (unsigned char *)buf_alloc; //reset buf - buf = buf + ((MAX_BUF - 1) * TEST_SIZE); //Line up TEST_SIZE from end - for (i = 0; i <= TEST_SIZE; i++) { - crc_ref = test_func->crc64_ref_call(TEST_SEED, buf + i, TEST_SIZE - i); - crc_base = test_func->crc64_base_call(TEST_SEED, buf + i, TEST_SIZE - i); - crc = test_func->crc64_func_call(TEST_SEED, buf + i, TEST_SIZE - i); + buf = (unsigned char *) buf_alloc; // reset buf + buf = buf + ((MAX_BUF - 1) * TEST_SIZE); // Line up TEST_SIZE from end + for (i = 0; i <= TEST_SIZE; i++) { + crc_ref = test_func->crc64_ref_call(TEST_SEED, buf + i, TEST_SIZE - i); + crc_base = test_func->crc64_base_call(TEST_SEED, buf + i, TEST_SIZE - i); + crc = test_func->crc64_func_call(TEST_SEED, buf + i, TEST_SIZE - i); - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc eob rand%3d = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 - "\n", i, crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc eob rand%3d = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n", + i, crc_ref, crc_base, crc); + } #ifdef TEST_VERBOSE - else if (i % (TEST_SIZE / 8) == 0) - printf("."); + else if (i % (TEST_SIZE / 8) == 0) + printf("."); #endif - } + } - return fail; + return fail; } -int update_test(func_case_t * test_func) +int +update_test(func_case_t *test_func) { - uint64_t crc_ref, crc_base, crc; - int fail = 0; - int i; - uint64_t r; - unsigned char *buf = NULL; + uint64_t crc_ref, crc_base, crc; + int fail = 0; + int i; + uint64_t r; + unsigned char *buf = NULL; - buf = (unsigned char *)buf_alloc; //reset buf - r = rand(); - // Process the whole buf with reference func single call. - crc_ref = test_func->crc64_ref_call(r, buf, MAX_BUF * TEST_SIZE); - crc_base = test_func->crc64_base_call(r, buf, MAX_BUF * TEST_SIZE); - // Process buf with update method. - for (i = 0; i < TEST_SIZE; i++) { - crc = test_func->crc64_func_call(r, buf, MAX_BUF); - // Update crc seeds and buf pointer. - r = crc; - buf += MAX_BUF; - } + buf = (unsigned char *) buf_alloc; // reset buf + r = rand(); + // Process the whole buf with reference func single call. + crc_ref = test_func->crc64_ref_call(r, buf, MAX_BUF * TEST_SIZE); + crc_base = test_func->crc64_base_call(r, buf, MAX_BUF * TEST_SIZE); + // Process buf with update method. + for (i = 0; i < TEST_SIZE; i++) { + crc = test_func->crc64_func_call(r, buf, MAX_BUF); + // Update crc seeds and buf pointer. + r = crc; + buf += MAX_BUF; + } - if ((crc_base != crc_ref) || (crc != crc_ref)) { - fail++; - printf("fail crc rand%3d = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n", i, - crc_ref, crc_base, crc); - } + if ((crc_base != crc_ref) || (crc != crc_ref)) { + fail++; + printf("fail crc rand%3d = 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n", i, crc_ref, + crc_base, crc); + } #ifdef TEST_VERBOSE - else - printf("."); + else + printf("."); #endif - return fail; + return fail; } diff --git a/crc/crc64_ref.h b/crc/crc64_ref.h index bc990af..28a3f4c 100644 --- a/crc/crc64_ref.h +++ b/crc/crc64_ref.h @@ -37,142 +37,149 @@ extern "C" { #include "crc64.h" #ifdef _MSC_VER -# define inline __inline +#define inline __inline #endif -#define MAX_ITER 8 +#define MAX_ITER 8 // crc64_ecma reference function, slow crc64 from the definition. -static inline uint64_t crc64_ecma_refl_ref(uint64_t seed, const uint8_t * buf, uint64_t len) +static inline uint64_t +crc64_ecma_refl_ref(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - unsigned int i, j; + uint64_t rem = ~seed; + unsigned int i, j; - uint64_t poly = 0xC96C5795D7870F42ULL; // ECMA-182 standard reflected + uint64_t poly = 0xC96C5795D7870F42ULL; // ECMA-182 standard reflected - for (i = 0; i < len; i++) { - rem = rem ^ (uint64_t) buf[i]; - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x1ULL ? poly : 0) ^ (rem >> 1); - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ (uint64_t) buf[i]; + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x1ULL ? poly : 0) ^ (rem >> 1); + } + } + return ~rem; } -static inline uint64_t crc64_ecma_norm_ref(uint64_t seed, const uint8_t * buf, uint64_t len) +static inline uint64_t +crc64_ecma_norm_ref(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - unsigned int i, j; + uint64_t rem = ~seed; + unsigned int i, j; - uint64_t poly = 0x42F0E1EBA9EA3693ULL; // ECMA-182 standard + uint64_t poly = 0x42F0E1EBA9EA3693ULL; // ECMA-182 standard - for (i = 0; i < len; i++) { - rem = rem ^ ((uint64_t) buf[i] << 56); - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x8000000000000000ULL ? poly : 0) ^ (rem << 1); - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ ((uint64_t) buf[i] << 56); + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x8000000000000000ULL ? poly : 0) ^ (rem << 1); + } + } + return ~rem; } // crc64_iso reference function, slow crc64 from the definition. -static inline uint64_t crc64_iso_refl_ref(uint64_t seed, const uint8_t * buf, uint64_t len) +static inline uint64_t +crc64_iso_refl_ref(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - unsigned int i, j; + uint64_t rem = ~seed; + unsigned int i, j; - uint64_t poly = 0xD800000000000000ULL; // ISO standard reflected + uint64_t poly = 0xD800000000000000ULL; // ISO standard reflected - for (i = 0; i < len; i++) { - rem = rem ^ (uint64_t) buf[i]; - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x1ULL ? poly : 0) ^ (rem >> 1); - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ (uint64_t) buf[i]; + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x1ULL ? poly : 0) ^ (rem >> 1); + } + } + return ~rem; } -static inline uint64_t crc64_iso_norm_ref(uint64_t seed, const uint8_t * buf, uint64_t len) +static inline uint64_t +crc64_iso_norm_ref(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - unsigned int i, j; + uint64_t rem = ~seed; + unsigned int i, j; - uint64_t poly = 0x000000000000001BULL; // ISO standard + uint64_t poly = 0x000000000000001BULL; // ISO standard - for (i = 0; i < len; i++) { - rem = rem ^ ((uint64_t) buf[i] << 56); - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x8000000000000000ULL ? poly : 0) ^ (rem << 1); - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ ((uint64_t) buf[i] << 56); + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x8000000000000000ULL ? poly : 0) ^ (rem << 1); + } + } + return ~rem; } // crc64_jones reference function, slow crc64 from the definition. -static inline uint64_t crc64_jones_refl_ref(uint64_t seed, const uint8_t * buf, uint64_t len) +static inline uint64_t +crc64_jones_refl_ref(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - unsigned int i, j; + uint64_t rem = ~seed; + unsigned int i, j; - uint64_t poly = 0x95ac9329ac4bc9b5ULL; // Jones coefficients reflected + uint64_t poly = 0x95ac9329ac4bc9b5ULL; // Jones coefficients reflected - for (i = 0; i < len; i++) { - rem = rem ^ (uint64_t) buf[i]; - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x1ULL ? poly : 0) ^ (rem >> 1); - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ (uint64_t) buf[i]; + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x1ULL ? poly : 0) ^ (rem >> 1); + } + } + return ~rem; } -static inline uint64_t crc64_jones_norm_ref(uint64_t seed, const uint8_t * buf, uint64_t len) +static inline uint64_t +crc64_jones_norm_ref(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - unsigned int i, j; + uint64_t rem = ~seed; + unsigned int i, j; - uint64_t poly = 0xad93d23594c935a9ULL; // Jones coefficients + uint64_t poly = 0xad93d23594c935a9ULL; // Jones coefficients - for (i = 0; i < len; i++) { - rem = rem ^ ((uint64_t) buf[i] << 56); - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x8000000000000000ULL ? poly : 0) ^ (rem << 1); - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ ((uint64_t) buf[i] << 56); + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x8000000000000000ULL ? poly : 0) ^ (rem << 1); + } + } + return ~rem; } - // crc64_rocksoft reference function, slow crc64 from the definition. -static inline uint64_t crc64_rocksoft_refl_ref(uint64_t seed, const uint8_t * buf, uint64_t len) +static inline uint64_t +crc64_rocksoft_refl_ref(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - unsigned int i, j; + uint64_t rem = ~seed; + unsigned int i, j; - uint64_t poly = 0x9a6c9329ac4bc9b5ULL; // Rocksoft coefficients reflected + uint64_t poly = 0x9a6c9329ac4bc9b5ULL; // Rocksoft coefficients reflected - for (i = 0; i < len; i++) { - rem = rem ^ (uint64_t) buf[i]; - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x1ULL ? poly : 0) ^ (rem >> 1); - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ (uint64_t) buf[i]; + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x1ULL ? poly : 0) ^ (rem >> 1); + } + } + return ~rem; } -static inline uint64_t crc64_rocksoft_norm_ref(uint64_t seed, const uint8_t * buf, uint64_t len) +static inline uint64_t +crc64_rocksoft_norm_ref(uint64_t seed, const uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - unsigned int i, j; + uint64_t rem = ~seed; + unsigned int i, j; - uint64_t poly = 0xad93d23594c93659ULL; // Rocksoft coefficients + uint64_t poly = 0xad93d23594c93659ULL; // Rocksoft coefficients - for (i = 0; i < len; i++) { - rem = rem ^ ((uint64_t) buf[i] << 56); - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x8000000000000000ULL ? poly : 0) ^ (rem << 1); - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ ((uint64_t) buf[i] << 56); + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x8000000000000000ULL ? poly : 0) ^ (rem << 1); + } + } + return ~rem; } #ifdef __cplusplus } diff --git a/crc/crc_base.c b/crc/crc_base.c index 7267f4f..6df6bfc 100644 --- a/crc/crc_base.c +++ b/crc/crc_base.c @@ -30,304 +30,220 @@ #include "crc.h" static const uint16_t crc16tab[256] = { - 0x0000, 0x8BB7, 0x9CD9, 0x176E, 0xB205, 0x39B2, 0x2EDC, 0xA56B, - 0xEFBD, 0x640A, 0x7364, 0xF8D3, 0x5DB8, 0xD60F, 0xC161, 0x4AD6, - 0x54CD, 0xDF7A, 0xC814, 0x43A3, 0xE6C8, 0x6D7F, 0x7A11, 0xF1A6, - 0xBB70, 0x30C7, 0x27A9, 0xAC1E, 0x0975, 0x82C2, 0x95AC, 0x1E1B, - 0xA99A, 0x222D, 0x3543, 0xBEF4, 0x1B9F, 0x9028, 0x8746, 0x0CF1, - 0x4627, 0xCD90, 0xDAFE, 0x5149, 0xF422, 0x7F95, 0x68FB, 0xE34C, - 0xFD57, 0x76E0, 0x618E, 0xEA39, 0x4F52, 0xC4E5, 0xD38B, 0x583C, - 0x12EA, 0x995D, 0x8E33, 0x0584, 0xA0EF, 0x2B58, 0x3C36, 0xB781, - 0xD883, 0x5334, 0x445A, 0xCFED, 0x6A86, 0xE131, 0xF65F, 0x7DE8, - 0x373E, 0xBC89, 0xABE7, 0x2050, 0x853B, 0x0E8C, 0x19E2, 0x9255, - 0x8C4E, 0x07F9, 0x1097, 0x9B20, 0x3E4B, 0xB5FC, 0xA292, 0x2925, - 0x63F3, 0xE844, 0xFF2A, 0x749D, 0xD1F6, 0x5A41, 0x4D2F, 0xC698, - 0x7119, 0xFAAE, 0xEDC0, 0x6677, 0xC31C, 0x48AB, 0x5FC5, 0xD472, - 0x9EA4, 0x1513, 0x027D, 0x89CA, 0x2CA1, 0xA716, 0xB078, 0x3BCF, - 0x25D4, 0xAE63, 0xB90D, 0x32BA, 0x97D1, 0x1C66, 0x0B08, 0x80BF, - 0xCA69, 0x41DE, 0x56B0, 0xDD07, 0x786C, 0xF3DB, 0xE4B5, 0x6F02, - 0x3AB1, 0xB106, 0xA668, 0x2DDF, 0x88B4, 0x0303, 0x146D, 0x9FDA, - 0xD50C, 0x5EBB, 0x49D5, 0xC262, 0x6709, 0xECBE, 0xFBD0, 0x7067, - 0x6E7C, 0xE5CB, 0xF2A5, 0x7912, 0xDC79, 0x57CE, 0x40A0, 0xCB17, - 0x81C1, 0x0A76, 0x1D18, 0x96AF, 0x33C4, 0xB873, 0xAF1D, 0x24AA, - 0x932B, 0x189C, 0x0FF2, 0x8445, 0x212E, 0xAA99, 0xBDF7, 0x3640, - 0x7C96, 0xF721, 0xE04F, 0x6BF8, 0xCE93, 0x4524, 0x524A, 0xD9FD, - 0xC7E6, 0x4C51, 0x5B3F, 0xD088, 0x75E3, 0xFE54, 0xE93A, 0x628D, - 0x285B, 0xA3EC, 0xB482, 0x3F35, 0x9A5E, 0x11E9, 0x0687, 0x8D30, - 0xE232, 0x6985, 0x7EEB, 0xF55C, 0x5037, 0xDB80, 0xCCEE, 0x4759, - 0x0D8F, 0x8638, 0x9156, 0x1AE1, 0xBF8A, 0x343D, 0x2353, 0xA8E4, - 0xB6FF, 0x3D48, 0x2A26, 0xA191, 0x04FA, 0x8F4D, 0x9823, 0x1394, - 0x5942, 0xD2F5, 0xC59B, 0x4E2C, 0xEB47, 0x60F0, 0x779E, 0xFC29, - 0x4BA8, 0xC01F, 0xD771, 0x5CC6, 0xF9AD, 0x721A, 0x6574, 0xEEC3, - 0xA415, 0x2FA2, 0x38CC, 0xB37B, 0x1610, 0x9DA7, 0x8AC9, 0x017E, - 0x1F65, 0x94D2, 0x83BC, 0x080B, 0xAD60, 0x26D7, 0x31B9, 0xBA0E, - 0xF0D8, 0x7B6F, 0x6C01, 0xE7B6, 0x42DD, 0xC96A, 0xDE04, 0x55B3 + 0x0000, 0x8BB7, 0x9CD9, 0x176E, 0xB205, 0x39B2, 0x2EDC, 0xA56B, 0xEFBD, 0x640A, 0x7364, + 0xF8D3, 0x5DB8, 0xD60F, 0xC161, 0x4AD6, 0x54CD, 0xDF7A, 0xC814, 0x43A3, 0xE6C8, 0x6D7F, + 0x7A11, 0xF1A6, 0xBB70, 0x30C7, 0x27A9, 0xAC1E, 0x0975, 0x82C2, 0x95AC, 0x1E1B, 0xA99A, + 0x222D, 0x3543, 0xBEF4, 0x1B9F, 0x9028, 0x8746, 0x0CF1, 0x4627, 0xCD90, 0xDAFE, 0x5149, + 0xF422, 0x7F95, 0x68FB, 0xE34C, 0xFD57, 0x76E0, 0x618E, 0xEA39, 0x4F52, 0xC4E5, 0xD38B, + 0x583C, 0x12EA, 0x995D, 0x8E33, 0x0584, 0xA0EF, 0x2B58, 0x3C36, 0xB781, 0xD883, 0x5334, + 0x445A, 0xCFED, 0x6A86, 0xE131, 0xF65F, 0x7DE8, 0x373E, 0xBC89, 0xABE7, 0x2050, 0x853B, + 0x0E8C, 0x19E2, 0x9255, 0x8C4E, 0x07F9, 0x1097, 0x9B20, 0x3E4B, 0xB5FC, 0xA292, 0x2925, + 0x63F3, 0xE844, 0xFF2A, 0x749D, 0xD1F6, 0x5A41, 0x4D2F, 0xC698, 0x7119, 0xFAAE, 0xEDC0, + 0x6677, 0xC31C, 0x48AB, 0x5FC5, 0xD472, 0x9EA4, 0x1513, 0x027D, 0x89CA, 0x2CA1, 0xA716, + 0xB078, 0x3BCF, 0x25D4, 0xAE63, 0xB90D, 0x32BA, 0x97D1, 0x1C66, 0x0B08, 0x80BF, 0xCA69, + 0x41DE, 0x56B0, 0xDD07, 0x786C, 0xF3DB, 0xE4B5, 0x6F02, 0x3AB1, 0xB106, 0xA668, 0x2DDF, + 0x88B4, 0x0303, 0x146D, 0x9FDA, 0xD50C, 0x5EBB, 0x49D5, 0xC262, 0x6709, 0xECBE, 0xFBD0, + 0x7067, 0x6E7C, 0xE5CB, 0xF2A5, 0x7912, 0xDC79, 0x57CE, 0x40A0, 0xCB17, 0x81C1, 0x0A76, + 0x1D18, 0x96AF, 0x33C4, 0xB873, 0xAF1D, 0x24AA, 0x932B, 0x189C, 0x0FF2, 0x8445, 0x212E, + 0xAA99, 0xBDF7, 0x3640, 0x7C96, 0xF721, 0xE04F, 0x6BF8, 0xCE93, 0x4524, 0x524A, 0xD9FD, + 0xC7E6, 0x4C51, 0x5B3F, 0xD088, 0x75E3, 0xFE54, 0xE93A, 0x628D, 0x285B, 0xA3EC, 0xB482, + 0x3F35, 0x9A5E, 0x11E9, 0x0687, 0x8D30, 0xE232, 0x6985, 0x7EEB, 0xF55C, 0x5037, 0xDB80, + 0xCCEE, 0x4759, 0x0D8F, 0x8638, 0x9156, 0x1AE1, 0xBF8A, 0x343D, 0x2353, 0xA8E4, 0xB6FF, + 0x3D48, 0x2A26, 0xA191, 0x04FA, 0x8F4D, 0x9823, 0x1394, 0x5942, 0xD2F5, 0xC59B, 0x4E2C, + 0xEB47, 0x60F0, 0x779E, 0xFC29, 0x4BA8, 0xC01F, 0xD771, 0x5CC6, 0xF9AD, 0x721A, 0x6574, + 0xEEC3, 0xA415, 0x2FA2, 0x38CC, 0xB37B, 0x1610, 0x9DA7, 0x8AC9, 0x017E, 0x1F65, 0x94D2, + 0x83BC, 0x080B, 0xAD60, 0x26D7, 0x31B9, 0xBA0E, 0xF0D8, 0x7B6F, 0x6C01, 0xE7B6, 0x42DD, + 0xC96A, 0xDE04, 0x55B3 }; static const uint32_t crc32_table_iscsi_refl[256] = { - 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, - 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, - 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, - 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, - 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, - 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, - 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, - 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, - 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, - 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, - 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, - 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, - 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, - 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, - 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, - 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, - 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, - 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, - 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, - 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, - 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, - 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, - 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, - 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, - 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, - 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, - 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, - 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, - 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, - 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, - 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, - 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, - 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, - 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, - 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, - 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, - 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, - 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, - 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, - 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, - 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, - 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, - 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, - 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, - 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, - 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, - 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, - 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, - 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, - 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, - 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, - 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, - 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, - 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, - 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, - 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, - 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, - 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, - 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, - 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, - 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, - 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, - 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, - 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 + 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, + 0xD4CA64EB, 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, + 0xAC78BF27, 0x5E133C24, 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, + 0x25AFD373, 0x36FF2087, 0xC494A384, 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, + 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, + 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, 0xAA64D611, 0x580F5512, + 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, 0x30E349B1, + 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, + 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, + 0x6EF07595, 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, + 0x67DAFA54, 0x95B17957, 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, + 0xFE53516F, 0xED03A29B, 0x1F682198, 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, + 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, + 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, 0x61C69362, 0x93AD1061, + 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, 0xEB1FCBAD, + 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, + 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, + 0xA55230E6, 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, + 0xDDE0EB2A, 0x2F8B6829, 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, + 0xB7072F64, 0xA457DC90, 0x563C5F93, 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, + 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, 0x92A8FC17, 0x60C37F14, 0x73938CE0, + 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, 0x1871A4D8, 0xEA1A27DB, + 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, 0xA24BB5A6, + 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, + 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, + 0xFC588982, 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, + 0x94B49521, 0x66DF1622, 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, + 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, + 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, + 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, 0xD3D3E1AB, 0x21B862A8, + 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, 0x590AB964, + 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, + 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, + 0x37FACCF1, 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, + 0x4F48173D, 0xBD23943E, 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, + 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, + 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 }; static const uint32_t crc32_table_ieee_norm[256] = { - 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, - 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, - 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, - 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, - 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, - 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, - 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, - 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd, - 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, - 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, - 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81, - 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, - 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, - 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, - 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, - 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, - 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, - 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, - 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, - 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, - 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, - 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, - 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066, - 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, - 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, - 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692, - 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, - 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, - 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, - 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, - 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, - 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a, - 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, - 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, - 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, - 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, - 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, - 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b, - 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, - 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, - 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, - 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, - 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, - 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, - 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, - 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, - 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, - 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, - 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, - 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, - 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, - 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, - 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30, - 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, - 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, - 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, - 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, - 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, - 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, - 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, - 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, - 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, - 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, - 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 + 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, + 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, + 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac, + 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, + 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, + 0x95609039, 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef, + 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, + 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, + 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, + 0xec7dd02d, 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, + 0x2e003dc5, 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, + 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, + 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, + 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, 0xaca5c697, 0xa864db20, + 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, + 0x8e6c3698, 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, + 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, + 0xfef34de2, 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, + 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, 0x7a089632, + 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, + 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, + 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, + 0x0a97ed48, 0x0e56f0ff, 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, + 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, + 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, + 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2, 0xaafbe615, + 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, 0x8832161a, + 0x8cf30bad, 0x81b02d74, 0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, + 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, + 0x76c15bf8, 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, + 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, 0x3793a651, + 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, + 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, + 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, + 0xf9278673, 0xfde69bc4, 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, + 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, + 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 }; static const uint32_t crc32_table_gzip_refl[256] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, - 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, - 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, - 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, - 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, - 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, - 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, - 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, - 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, - 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, - 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, - 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, - 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, - 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, - 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, - 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, - 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, - 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, - 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, - 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, - 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, - 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, - 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, - 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, - 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, - 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, - 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, - 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, - 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, - 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, - 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, - 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, - 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, - 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, - 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, - 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, - 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, - 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, - 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, - 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, - 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, - 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, - 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, - 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, - 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, - 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, - 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, - 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, - 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, - 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, - 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, - 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, + 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, + 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, + 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, + 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, + 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, + 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, + 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, + 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, + 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, + 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, + 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, + 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, + 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, + 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, + 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, + 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, + 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, + 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, + 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, + 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, + 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, + 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, + 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, + 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, + 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, + 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -uint16_t crc16_t10dif_base(uint16_t seed, uint8_t * buf, uint64_t len) +uint16_t +crc16_t10dif_base(uint16_t seed, uint8_t *buf, uint64_t len) { - int i; - uint16_t crc = seed; + int i; + uint16_t crc = seed; - for (i = 0; i < len; i++) - crc = (crc << 8) ^ crc16tab[((crc >> 8) ^ *buf++) & 0x00FF]; + for (i = 0; i < len; i++) + crc = (crc << 8) ^ crc16tab[((crc >> 8) ^ *buf++) & 0x00FF]; - return crc; + return crc; } -uint16_t crc16_t10dif_copy_base(uint16_t seed, uint8_t * dst, uint8_t * src, uint64_t len) +uint16_t +crc16_t10dif_copy_base(uint16_t seed, uint8_t *dst, uint8_t *src, uint64_t len) { - int i; - uint16_t crc = seed; + int i; + uint16_t crc = seed; - for (i = 0; i < len; i++) { - crc = (crc << 8) ^ crc16tab[((crc >> 8) ^ *src) & 0x00FF]; - *dst++ = *src++; - } + for (i = 0; i < len; i++) { + crc = (crc << 8) ^ crc16tab[((crc >> 8) ^ *src) & 0x00FF]; + *dst++ = *src++; + } - return crc; + return crc; } -unsigned int crc32_iscsi_base(unsigned char *buffer, int len, unsigned int crc_init) +unsigned int +crc32_iscsi_base(unsigned char *buffer, int len, unsigned int crc_init) { - unsigned int crc; - unsigned char *p_buf; - unsigned char *p_end = buffer + len; + unsigned int crc; + unsigned char *p_buf; + unsigned char *p_end = buffer + len; - p_buf = buffer; - crc = crc_init; + p_buf = buffer; + crc = crc_init; - while (p_buf < p_end) { - crc = (crc >> 8) ^ crc32_table_iscsi_refl[(crc & 0x000000FF) ^ *p_buf++]; - } - return crc; + while (p_buf < p_end) { + crc = (crc >> 8) ^ crc32_table_iscsi_refl[(crc & 0x000000FF) ^ *p_buf++]; + } + return crc; } -uint32_t crc32_ieee_base(uint32_t seed, uint8_t * buf, uint64_t len) +uint32_t +crc32_ieee_base(uint32_t seed, uint8_t *buf, uint64_t len) { - unsigned int crc = ~seed; + unsigned int crc = ~seed; - while (len--) { - crc = (crc << 8) ^ crc32_table_ieee_norm[((crc >> 24) ^ *buf) & 255]; - buf++; - } + while (len--) { + crc = (crc << 8) ^ crc32_table_ieee_norm[((crc >> 24) ^ *buf) & 255]; + buf++; + } - return ~crc; + return ~crc; } -uint32_t crc32_gzip_refl_base(uint32_t seed, uint8_t * buf, uint64_t len) +uint32_t +crc32_gzip_refl_base(uint32_t seed, uint8_t *buf, uint64_t len) { - unsigned int crc; - unsigned char *p_buf; - unsigned char *p_end = buf + len; + unsigned int crc; + unsigned char *p_buf; + unsigned char *p_end = buf + len; - p_buf = (unsigned char *)buf; - crc = ~seed; + p_buf = (unsigned char *) buf; + crc = ~seed; - while (p_buf < p_end) { - crc = (crc >> 8) ^ crc32_table_gzip_refl[(crc & 0x000000FF) ^ *p_buf++]; - } + while (p_buf < p_end) { + crc = (crc >> 8) ^ crc32_table_gzip_refl[(crc & 0x000000FF) ^ *p_buf++]; + } - return ~crc; + return ~crc; } diff --git a/crc/crc_base_aliases.c b/crc/crc_base_aliases.c index a63f4e4..f9dbfa7 100644 --- a/crc/crc_base_aliases.c +++ b/crc/crc_base_aliases.c @@ -31,67 +31,80 @@ #include "crc64.h" #include -unsigned int crc32_iscsi(unsigned char *buffer, int len, unsigned int crc_init) +unsigned int +crc32_iscsi(unsigned char *buffer, int len, unsigned int crc_init) { - return crc32_iscsi_base(buffer, len, crc_init); + return crc32_iscsi_base(buffer, len, crc_init); } -uint16_t crc16_t10dif(uint16_t seed, const unsigned char *buf, uint64_t len) +uint16_t +crc16_t10dif(uint16_t seed, const unsigned char *buf, uint64_t len) { - return crc16_t10dif_base(seed, (uint8_t *) buf, len); + return crc16_t10dif_base(seed, (uint8_t *) buf, len); } -uint16_t crc16_t10dif_copy(uint16_t seed, uint8_t * dst, uint8_t * src, uint64_t len) +uint16_t +crc16_t10dif_copy(uint16_t seed, uint8_t *dst, uint8_t *src, uint64_t len) { - return crc16_t10dif_copy_base(seed, dst, src, len); + return crc16_t10dif_copy_base(seed, dst, src, len); } -uint32_t crc32_ieee(uint32_t seed, const unsigned char *buf, uint64_t len) +uint32_t +crc32_ieee(uint32_t seed, const unsigned char *buf, uint64_t len) { - return crc32_ieee_base(seed, (uint8_t *) buf, len); + return crc32_ieee_base(seed, (uint8_t *) buf, len); } -uint32_t crc32_gzip_refl(uint32_t seed, const unsigned char *buf, uint64_t len) +uint32_t +crc32_gzip_refl(uint32_t seed, const unsigned char *buf, uint64_t len) { - return crc32_gzip_refl_base(seed, (uint8_t *) buf, len); + return crc32_gzip_refl_base(seed, (uint8_t *) buf, len); } -uint64_t crc64_ecma_refl(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_ecma_refl(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_ecma_refl_base(seed, buf, len); + return crc64_ecma_refl_base(seed, buf, len); } -uint64_t crc64_ecma_norm(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_ecma_norm(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_ecma_norm_base(seed, buf, len); + return crc64_ecma_norm_base(seed, buf, len); } -uint64_t crc64_iso_refl(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_iso_refl(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_iso_refl_base(seed, buf, len); + return crc64_iso_refl_base(seed, buf, len); } -uint64_t crc64_iso_norm(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_iso_norm(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_iso_norm_base(seed, buf, len); + return crc64_iso_norm_base(seed, buf, len); } -uint64_t crc64_jones_refl(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_jones_refl(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_jones_refl_base(seed, buf, len); + return crc64_jones_refl_base(seed, buf, len); } -uint64_t crc64_jones_norm(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_jones_norm(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_jones_norm_base(seed, buf, len); + return crc64_jones_norm_base(seed, buf, len); } -uint64_t crc64_rocksoft_refl(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_rocksoft_refl(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_rocksoft_refl_base(seed, buf, len); + return crc64_rocksoft_refl_base(seed, buf, len); } -uint64_t crc64_rocksoft_norm(uint64_t seed, const uint8_t * buf, uint64_t len) +uint64_t +crc64_rocksoft_norm(uint64_t seed, const uint8_t *buf, uint64_t len) { - return crc64_rocksoft_norm_base(seed, buf, len); + return crc64_rocksoft_norm_base(seed, buf, len); } diff --git a/crc/crc_ref.h b/crc/crc_ref.h index e97a60b..e188519 100644 --- a/crc/crc_ref.h +++ b/crc/crc_ref.h @@ -37,100 +37,105 @@ extern "C" { #include "crc.h" #ifdef _MSC_VER -# define inline __inline +#define inline __inline #endif -#define MAX_ITER 8 +#define MAX_ITER 8 // iSCSI CRC reference function -static inline unsigned int crc32_iscsi_ref(unsigned char *buffer, int len, unsigned int crc_init) +static inline unsigned int +crc32_iscsi_ref(unsigned char *buffer, int len, unsigned int crc_init) { - uint64_t rem = crc_init; - int i, j; + uint64_t rem = crc_init; + int i, j; - uint32_t poly = 0x82F63B78; + uint32_t poly = 0x82F63B78; - for (i = 0; i < len; i++) { - rem = rem ^ (buffer[i]); - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x1ULL) ? (rem >> 1) ^ poly : (rem >> 1); - } - } - return rem; + for (i = 0; i < len; i++) { + rem = rem ^ (buffer[i]); + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x1ULL) ? (rem >> 1) ^ poly : (rem >> 1); + } + } + return rem; } // crc16_t10dif reference function, slow crc16 from the definition. -static inline uint16_t crc16_t10dif_ref(uint16_t seed, uint8_t * buf, uint64_t len) +static inline uint16_t +crc16_t10dif_ref(uint16_t seed, uint8_t *buf, uint64_t len) { - size_t rem = seed; - unsigned int i, j; + size_t rem = seed; + unsigned int i, j; - uint16_t poly = 0x8bb7; // t10dif standard + uint16_t poly = 0x8bb7; // t10dif standard - for (i = 0; i < len; i++) { - rem = rem ^ (buf[i] << 8); - for (j = 0; j < MAX_ITER; j++) { - rem = rem << 1; - rem = (rem & 0x10000) ? rem ^ poly : rem; - } - } - return rem; + for (i = 0; i < len; i++) { + rem = rem ^ (buf[i] << 8); + for (j = 0; j < MAX_ITER; j++) { + rem = rem << 1; + rem = (rem & 0x10000) ? rem ^ poly : rem; + } + } + return rem; } // crc16_t10dif reference function, slow crc16 from the definition. -static inline uint16_t crc16_t10dif_copy_ref(uint16_t seed, uint8_t * dst, uint8_t * src, uint64_t len) +static inline uint16_t +crc16_t10dif_copy_ref(uint16_t seed, uint8_t *dst, uint8_t *src, uint64_t len) { - size_t rem = seed; - unsigned int i, j; + size_t rem = seed; + unsigned int i, j; - uint16_t poly = 0x8bb7; // t10dif standard + uint16_t poly = 0x8bb7; // t10dif standard - for (i = 0; i < len; i++) { - rem = rem ^ (src[i] << 8); - dst[i] = src[i]; - for (j = 0; j < MAX_ITER; j++) { - rem = rem << 1; - rem = (rem & 0x10000) ? rem ^ poly : rem; - } - } - return rem; + for (i = 0; i < len; i++) { + rem = rem ^ (src[i] << 8); + dst[i] = src[i]; + for (j = 0; j < MAX_ITER; j++) { + rem = rem << 1; + rem = (rem & 0x10000) ? rem ^ poly : rem; + } + } + return rem; } // crc32_ieee reference function, slow crc32 from the definition. -static inline uint32_t crc32_ieee_ref(uint32_t seed, uint8_t * buf, uint64_t len) +static inline uint32_t +crc32_ieee_ref(uint32_t seed, uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - unsigned int i, j; + uint64_t rem = ~seed; + unsigned int i, j; - uint32_t poly = 0x04C11DB7; // IEEE standard + uint32_t poly = 0x04C11DB7; // IEEE standard - for (i = 0; i < len; i++) { - rem = rem ^ ((uint64_t) buf[i] << 24); - for (j = 0; j < MAX_ITER; j++) { - rem = rem << 1; - rem = (rem & 0x100000000ULL) ? rem ^ poly : rem; - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ ((uint64_t) buf[i] << 24); + for (j = 0; j < MAX_ITER; j++) { + rem = rem << 1; + rem = (rem & 0x100000000ULL) ? rem ^ poly : rem; + } + } + return ~rem; } // crc32_gzip_refl reference function, slow crc32 from the definition. // Please get difference details between crc32_gzip_ref and crc32_ieee // from crc.h. -static inline uint32_t crc32_gzip_refl_ref(uint32_t seed, uint8_t * buf, uint64_t len) +static inline uint32_t +crc32_gzip_refl_ref(uint32_t seed, uint8_t *buf, uint64_t len) { - uint64_t rem = ~seed; - int i, j; + uint64_t rem = ~seed; + int i, j; - uint32_t poly = 0xEDB88320; // IEEE standard + uint32_t poly = 0xEDB88320; // IEEE standard - for (i = 0; i < len; i++) { - rem = rem ^ (buf[i]); - for (j = 0; j < MAX_ITER; j++) { - rem = (rem & 0x1ULL) ? (rem >> 1) ^ poly : (rem >> 1); - } - } - return ~rem; + for (i = 0; i < len; i++) { + rem = rem ^ (buf[i]); + for (j = 0; j < MAX_ITER; j++) { + rem = (rem & 0x1ULL) ? (rem >> 1) ^ poly : (rem >> 1); + } + } + return ~rem; } #ifdef __cplusplus diff --git a/crc/crc_simple_test.c b/crc/crc_simple_test.c index 4799f87..1c15294 100644 --- a/crc/crc_simple_test.c +++ b/crc/crc_simple_test.c @@ -36,29 +36,30 @@ const uint16_t t10_dif_expected = 0x60b3; const uint32_t init_crc_32 = 0x12345678; const uint32_t ieee_expected = 0x2ceadbe3; -int main(void) +int +main(void) { - unsigned char p_buf[48]; - uint16_t t10_dif_computed; - uint32_t ieee_computed; - int i; + unsigned char p_buf[48]; + uint16_t t10_dif_computed; + uint32_t ieee_computed; + int i; - for (i = 0; i < 48; i++) - p_buf[i] = i; + for (i = 0; i < 48; i++) + p_buf[i] = i; - t10_dif_computed = crc16_t10dif(init_crc_16, p_buf, 48); + t10_dif_computed = crc16_t10dif(init_crc_16, p_buf, 48); - if (t10_dif_computed != t10_dif_expected) - printf("WRONG CRC-16(T10 DIF) value\n"); - else - printf("CORRECT CRC-16(T10 DIF) value\n"); + if (t10_dif_computed != t10_dif_expected) + printf("WRONG CRC-16(T10 DIF) value\n"); + else + printf("CORRECT CRC-16(T10 DIF) value\n"); - ieee_computed = crc32_ieee(init_crc_32, p_buf, 48); + ieee_computed = crc32_ieee(init_crc_32, p_buf, 48); - if (ieee_computed != ieee_expected) - printf("WRONG CRC-32(IEEE) value\n"); - else - printf("CORRECT CRC-32(IEEE) value\n"); + if (ieee_computed != ieee_expected) + printf("WRONG CRC-32(IEEE) value\n"); + else + printf("CORRECT CRC-32(IEEE) value\n"); - return 0; + return 0; }