Fixes for compression corruption
Merge pull request #4 from danieldresser/working

Fixes for compression corruption