diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-08-06 07:55:08 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-08-06 07:55:08 (GMT) |
commit | 4ea832b8ff1d43c779a1c41dc3e3d6ff418143a4 (patch) | |
tree | a653e0420f39a5bda048250c6c696afe77234902 /programs | |
parent | a0755949b6f2e01c5a7d10a8aa6cbc11ac7504aa (diff) | |
download | lz4-4ea832b8ff1d43c779a1c41dc3e3d6ff418143a4.zip lz4-4ea832b8ff1d43c779a1c41dc3e3d6ff418143a4.tar.gz lz4-4ea832b8ff1d43c779a1c41dc3e3d6ff418143a4.tar.bz2 |
Updated Makefile : make dist
Minor formatting changes for xxhash
Diffstat (limited to 'programs')
-rw-r--r-- | programs/xxhash.c | 26 | ||||
-rw-r--r-- | programs/xxhash.h | 2 |
2 files changed, 1 insertions, 27 deletions
diff --git a/programs/xxhash.c b/programs/xxhash.c index 99bbe7c..a9925fc 100644 --- a/programs/xxhash.c +++ b/programs/xxhash.c @@ -374,8 +374,6 @@ FORCE_INLINE U64 XXH64_endian_align(const void* input, unsigned int len, U64 see p+=8;
}
-#if 1 - if (p<=bEnd-4)
{
h64 ^= (U64)(XXH_get32bits(p)) * PRIME64_1;
@@ -390,30 +388,6 @@ FORCE_INLINE U64 XXH64_endian_align(const void* input, unsigned int len, U64 see p++; } -#else - - if( p<bEnd ) - { - // Copy the remaining bytes - U64 k1 = PRIME64_5; - BYTE* _k1 = (BYTE*)&k1; - switch( (size_t)(bEnd-p)) // Yes, I tried multiple ways of doing this memcopy - { - case 7: *_k1++ = *p++; - case 6: *_k1++ = *p++; - case 5: *_k1++ = *p++; - case 4: *_k1++ = *p++; - case 3: *_k1++ = *p++; - case 2: *_k1++ = *p++; - case 1: *_k1++ = *p++; - } - - k1 *= PRIME64_5; k1 = XXH_rotl64(k1,31); k1 *= PRIME64_3; h64 ^= k1; - h64 = XXH_rotl64(h64, 11) * PRIME64_1 + PRIME64_4; - } - -#endif -
h64 ^= h64 >> 33;
h64 *= PRIME64_2;
h64 ^= h64 >> 29;
diff --git a/programs/xxhash.h b/programs/xxhash.h index 8271807..a7516ff 100644 --- a/programs/xxhash.h +++ b/programs/xxhash.h @@ -155,7 +155,7 @@ use the structure XXHnn_stateSpace_t, which will ensure that memory space is lar unsigned int XXH32_intermediateDigest (void* state);
unsigned long long XXH64_intermediateDigest (void* state);
/*
-This function does the same as XXHnn_digest(), generating a nn-bit hash,
+These functions do the same as XXHnn_digest(), generating a nn-bit hash,
but preserve memory context.
This way, it becomes possible to generate intermediate hashes, and then continue feeding data with XXHnn_update().
To free memory context, use XXHnn_digest(), or free().
|