The code rewrite is now well underway, thanks to tom, and the new system is much cleaner and uses better formulas. There is still a bug in the system for dealing with 8 bit wav files.
I have also started putting together compression support using zlib version 1.2.4. The code is in the repository and compiles on its own, but has not been tested or incorporated into the program as of yet.