Optimized Compress Function

This removes all the map loading overhead that I introduced last time.
The compress function is ~40 times faster.