lz_encoder_hash.h (213700) | lz_encoder_hash.h (223935) |
---|---|
1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file lz_encoder_hash.h 4/// \brief Hash macros for match finders 5// 6// Author: Igor Pavlov 7// 8// This file has been put into the public domain. --- 25 unchanged lines hidden (view full) --- 34 35#define FIX_3_HASH_SIZE (HASH_2_SIZE) 36#define FIX_4_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE) 37#define FIX_5_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE + HASH_4_SIZE) 38 39// Endianness doesn't matter in hash_2_calc() (no effect on the output). 40#ifdef TUKLIB_FAST_UNALIGNED_ACCESS 41# define hash_2_calc() \ | 1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file lz_encoder_hash.h 4/// \brief Hash macros for match finders 5// 6// Author: Igor Pavlov 7// 8// This file has been put into the public domain. --- 25 unchanged lines hidden (view full) --- 34 35#define FIX_3_HASH_SIZE (HASH_2_SIZE) 36#define FIX_4_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE) 37#define FIX_5_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE + HASH_4_SIZE) 38 39// Endianness doesn't matter in hash_2_calc() (no effect on the output). 40#ifdef TUKLIB_FAST_UNALIGNED_ACCESS 41# define hash_2_calc() \ |
42 const uint32_t hash_value = *(const uint16_t *)(cur); | 42 const uint32_t hash_value = *(const uint16_t *)(cur) |
43#else 44# define hash_2_calc() \ 45 const uint32_t hash_value \ 46 = (uint32_t)(cur[0]) | ((uint32_t)(cur[1]) << 8) 47#endif 48 49#define hash_3_calc() \ 50 const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \ --- 58 unchanged lines hidden --- | 43#else 44# define hash_2_calc() \ 45 const uint32_t hash_value \ 46 = (uint32_t)(cur[0]) | ((uint32_t)(cur[1]) << 8) 47#endif 48 49#define hash_3_calc() \ 50 const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \ --- 58 unchanged lines hidden --- |