Add README for table generator

GitOrigin-RevId: 8062aa48890eb74a92b3322fdf306df9e5ecdee2
This commit is contained in:
Dietrich Epp 2021-03-16 13:40:05 -04:00
parent 912c13f193
commit c058e68d93

11
gen/README.md Normal file
View File

@ -0,0 +1,11 @@
# Character Conversion Tables
Used by SyncFiles.
This program generates the tables necessary to convert from UTF-8 to Mac OS Roman.
The conversion process is entirely table-driven. The table maps a (state, input) pair to a (state, output) pair. The initial state is 0. A transition to state 0 is considered invalid.
A transition may have _both_ a state and output. This means that the input may be translated in different ways depending on the bytes that follow. The translation code prefers the longest path through the state table that results in an output.
The table is compressed with PackBits to reduce its size by a factor of 22x.