An encoder and decoder written in Python 2.7.