Optimized javascript library for compression