Wanted to store above font in EEPROM. each character takes 2x13 bytes. so 260 byte of memory are needed, but most chips have only 256 bytes of eeprom available.
I come up with run length encoding compression idea. Since there are only 5 bits used, can use remaining 3 as a counter, showing how many times current pattern should be repeated. This gives ability to repeat up to 8 positions

Say for character 4 (top left part), in "normal" mode, bit pattern looks like this: %11000. But if we add %110 to end of it, so it now looks like %11000110, decoder software will know that it have to repeat that pattern 6 times.

So code for reading and decoding char to appropriate DDRAM or whatever it is called, should work like this:

1. Set pointer address from which the bitmap should be read.
2. Read it, if 3 last bits<>0 then separate it, and do the loop, writing the code of first 5 bits, repeating them times specified in these 3 bits.
3. Continue reading of bitmap as needed.

But I have issue with statement for dividing bit variable into two. Say I have %10101010. How should I divide it into two variables, one which has 5 bits from left, and another having 3 bits from right?