14 #ifndef LZMA_FASTPOS_H
15 #define LZMA_FASTPOS_H
79 # define get_dist_slot(dist) \
80 ((dist) <= 4 ? (dist) : get_dist_slot_2(dist))
86 return (
i +
i) + ((dist >> (
i - 1)) & 1);
92 #define FASTPOS_BITS 13
97 #define fastpos_shift(extra, n) \
98 ((extra) + (n) * (FASTPOS_BITS - 1))
100 #define fastpos_limit(extra, n) \
101 (UINT32_C(1) << (FASTPOS_BITS + fastpos_shift(extra, n)))
103 #define fastpos_result(dist, extra, n) \
104 (uint32_t)(lzma_fastpos[(dist) >> fastpos_shift(extra, n)]) \
105 + 2 * fastpos_shift(extra, n)
123 #ifdef FULL_DISTANCES_BITS
const uint8_t lzma_fastpos[1<< FASTPOS_BITS]
#define fastpos_limit(extra, n)
#define fastpos_result(dist, extra, n)
static uint32_t get_dist_slot(uint32_t dist)
#define FULL_DISTANCES_BITS
assert(limit<=UINT32_MAX/2)
static uint32_t bsr32(uint32_t n)