Skip to content
Snippets Groups Projects
Commit 365deb9b authored by Oksana Shadura's avatar Oksana Shadura Committed by Philippe Canal
Browse files

Reverting back using standart solution for crc32 proposed by Madler

Using various CRC32 calculation techniques and algorithms didn't allow
 to achieve required compression ratio(to be investigated after).
parent 12a72f4e
No related branches found
No related tags found
No related merge requests found
...@@ -1131,16 +1131,18 @@ uint32_t crc32_16bytes_prefetch(const void* data, size_t length, uint32_t previo ...@@ -1131,16 +1131,18 @@ uint32_t crc32_16bytes_prefetch(const void* data, size_t length, uint32_t previo
return ~crc; // same as crc ^ 0xFFFFFFFF return ~crc; // same as crc ^ 0xFFFFFFFF
} }
// Solution to be used on Mac OS X (it gives better preciseness of data compression
// as in case of zlib-cf)
/*
static uint32_t hash_func_default(deflate_state *s, uint32_t UNUSED(h), void* str) { static uint32_t hash_func_default(deflate_state *s, uint32_t UNUSED(h), void* str) {
return crc32_8bytes(str, 32, 0) & s->hash_mask; return crc32_8bytes(str, 32, 0) & s->hash_mask;
} }
*/
// CRC32 calculation from zlib 1.2.8 - Madler // CRC32 calculation from zlib 1.2.8 - Madler
/*
static uint32_t hash_func_default(deflate_state *s, uint32_t h, void* str) { static uint32_t hash_func_default(deflate_state *s, uint32_t h, void* str) {
return ((h << s->hash_shift) ^ (*(uint32_t*)str)) & s->hash_mask; return ((h << s->hash_shift) ^ (*(uint32_t*)str)) & s->hash_mask;
} }
*/
#if defined (__aarch64__) #if defined (__aarch64__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment