Reverse prior to encoding
Merge pull request #55 from lantiga/master

Reverse prior to encoding