Y
Hacker News
new
|
ask
|
show
|
jobs
by
klyrs
1713 days ago
While I'm big on lookup tables for jobs like this, I'd have reached for bitmasks long before that polynomial...
1 comments
kardos
1713 days 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;
link