32 const size_t low_bit = i*14;
33 const size_t low_word = low_bit / 32;
34 const size_t high_bit = (i+1)*14-1;
35 const size_t high_word = high_bit / 32;
37 if (low_word == high_word) {
38 return (packed[low_word] >> (low_bit%32)) & 0x3FFF;
40 size_t high_off = high_word*32-low_bit;
42 uint16_t
result = (packed[low_word] >> (low_bit%32)) & (0x3FFF >> (14-high_off));
43 result |= (packed[high_word] << high_off) & ((0x3FFF << high_off) & 0x3FFF);