First, I am very grateful you have created a great library to ease the development of our projects.
after learning and experimenting. I saw one thing that I think we should change it.
In the source file bdf_rle.c function bg_prepare_01_rle(bg_t *bg, unsigned a, unsigned b). I change the comparison operand from >= in the two while loops to >.
That reduces one repetition if the length of bit 0 or bit 1 is within the specified number of bits.
Example in case:
bg->rle_bits_per_0= 3,
bg->rle_bits_per_1 = 4,
a = 7, b = 4
The number of compressions is 1 time instead of 2 times before the improvement.
First, I am very grateful you have created a great library to ease the development of our projects. after learning and experimenting. I saw one thing that I think we should change it. In the source file bdf_rle.c function bg_prepare_01_rle(bg_t *bg, unsigned a, unsigned b). I change the comparison operand from >= in the two while loops to >. That reduces one repetition if the length of bit 0 or bit 1 is within the specified number of bits. Example in case: bg->rle_bits_per_0= 3, bg->rle_bits_per_1 = 4, a = 7, b = 4 The number of compressions is 1 time instead of 2 times before the improvement.