Add encode test class.
Tweak readme.