Encoder with hardcoded table and input string