http://dystopiancode.blogspot.cz/2012/02/pcm-law-and-u-law-companding-algorithms.html