Function common_idx

Source
fn common_idx(input: u8, max: u8) -> u8
Expand description

common_idx translate a byte to an index in the COMMON_INPUTS_INV array.

I wonder if it would be prudent to store this mapping in the FST itself. The advantage of doing so would mean that common inputs would reflect the specific data in the FST. The problem of course is that this table has to be computed up front, which is pretty much at odds with the streaming nature of the builder.

Nevertheless, the caller may have a priori knowledge that could be supplied to the builder manually, which could then be embedded in the FST.