Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deflate_compress: use lazy2 compressor for levels 8-9
Instead of switching directly from the lazy compressor at level 7 to the near-optimal compressor at level 8, use the lazy2 compressor at levels 8-9 and don't switch to near-optimal until level 10. This avoids poor compression ratio and bad performance (both significantly worse than level 7, and significantly worse than zlib) at levels 8-9 on data where the near-optimal compressor doesn't do well until the parameters are cranked up. On data where the near-optimal compressor *does* do well, this change worsens the compression ratio of levels 8-9, but also speeds them up a lot, thus positioning them similarly vs. zlib as the lower levels (i.e. much faster and slightly stronger, rather than slightly faster and much stronger). The difference between levels 9 and 10 is increased, but that's perhaps the least bad place to have a discontinuity. Resolves #85
- Loading branch information