Lagarith decoder by Nathan Caldwell, saintdev at gmail