Optimize use of costs in DEFLATE compressor