Encoding moves each letter backward through the alphabet by a repeating pattern; decoding moves it forward again. After the 6th letter, the pattern starts over, and letters wrap around between A and Z.
See exactly how each character was shifted.