pub static TABLE_DECODER: [u8; 256]
Expand description
Table of length 256, mapping any u8
to the value it represents
0xff
values represent None
. Doing it this way instead of Option<u8>
halves
the size of this table (u8
is 1 byte, Option<u8>
is 2 bytes)
This table could be shrinked to just 96 elements, holding the range 32..128
,
but keeping it length 256 means it’s possible to index into this table with
any arbitrary byte value without going out of bounds, saving a check for a
value to be within 32..128
.