2 ms·
While I'm big on lookup tables for jobs like this, I'd have reached for bitmasks long before that polynomial...
by klyrs 5y ago
While I'm big on lookup tables for jobs like this, I'd have reached for bitmasks long before that polynomial...
- kardos 5y agoHard to compete with a 4-byte lookup table, but for decoding the 256-byte table can become: return ((dibit | (dibit -1))>>1) & 3;