Each character is processed mod 32 (with control flow such that the code implementing the mod operation only occurs once in the program). This enables case insensitivity, as well as collapsing the space character and EOF into a single case. A trailing newline is treated the same as J
, which doesn't affect the output.
When a space or EOF is reached, some juggling is done to reduce counts greater than 4 and to shift table entries greater than (1,3)
up by one to skip the letter J
, and then the decoded character is printed.