diff --git a/igzip/Makefile.am b/igzip/Makefile.am index c916475..7e90568 100644 --- a/igzip/Makefile.am +++ b/igzip/Makefile.am @@ -67,7 +67,7 @@ extern_hdrs += include/igzip_lib.h check_tests += igzip/igzip_rand_test check_tests += igzip/igzip_wrapper_hdr_test -unit_tests += igzip/checksum32_funcs_test +check_tests += igzip/checksum32_funcs_test other_tests += igzip/igzip_file_perf igzip/igzip_stateless_file_perf igzip/igzip_hist_perf other_tests += igzip/igzip_perf diff --git a/igzip/checksum32_funcs_test.c b/igzip/checksum32_funcs_test.c index ba0c4c7..cbb5d1b 100644 --- a/igzip/checksum32_funcs_test.c +++ b/igzip/checksum32_funcs_test.c @@ -33,6 +33,7 @@ #include #include "igzip_checksums.h" #include "checksum_test_ref.h" +#include "types.h" #ifndef TEST_SEED # define TEST_SEED 0x1234 diff --git a/include/igzip_lib.h b/include/igzip_lib.h index 800fa7b..a8b8779 100644 --- a/include/igzip_lib.h +++ b/include/igzip_lib.h @@ -914,6 +914,23 @@ int isal_inflate(struct inflate_state *state); */ int isal_inflate_stateless(struct inflate_state *state); +/******************************************************************************/ +/* Other functions */ +/******************************************************************************/ +/** + * @brief Calculate Adler-32 checksum, runs appropriate version. + * + * This function determines what instruction sets are enabled and selects the + * appropriate version at runtime. + * + * @param init: initial Adler-32 value + * @param buf: buffer to calculate checksum on + * @param len: buffer length in bytes + * + * @returns 32-bit Adler-32 checksum + */ +uint32_t isal_adler32(uint32_t init, const unsigned char *buf, uint64_t len); + #ifdef __cplusplus } #endif diff --git a/isa-l.def b/isa-l.def index 220d48d..b41754c 100644 --- a/isa-l.def +++ b/isa-l.def @@ -105,9 +105,10 @@ isal_deflate_reset @101 isal_inflate_set_dict @102 isal_inflate_reset @103 crc16_t10dif_copy @104 -isal_read_gzip_header @105 -isal_read_zlib_header @106 -isal_write_gzip_header @107 -isal_write_zlib_header @108 -isal_zero_detect @109 -isal_gzip_header_init @110 +isal_read_gzip_header @105 +isal_read_zlib_header @106 +isal_write_gzip_header @107 +isal_write_zlib_header @108 +isal_zero_detect @109 +isal_gzip_header_init @110 +isal_adler32 @111