5 ms·
Hard to compete with a 4-byte lookup table, but for decoding the 256-byte table can become: return ((dibit | (dibit -1))>>1) & 3;
by kardos 5y ago
Hard to compete with a 4-byte lookup table, but for decoding the 256-byte table can become: return ((dibit | (dibit -1))>>1) & 3;