We compress every image row the same way and I have a feelingit is not always helping. Check it for me and tell me when tobother.Write your requirements list before you write any code. Input, calculate, output, and anything you had to decide for yourself.
a plain sky: ratio 0.10 -> compress it a horizon: ratio 0.20 -> compress it dense text: ratio 1.50 -> do not compress this wayAll three rows are the same length. What changed is the redundancy, and the third row would cost 50% more space for the privilege of being compressed.
Your requirements list and your program file, named cc-compression-picker.