Go Down

Topic: Cramming Long Sequences of Numbers into Small Memory (Read 80 times) previous topic - next topic


Hey Everyone,

I have 366 bytes of EEPROM memory left on my board and I want to ideally cram 60+ sequences of 18 numbers.  Each number in that sequence is a value between 0-127.  Using hexadecimal I can get 40 sequences of 18 numbers, but is there a way to get even more?

The values are not always 3 digit, but they can be that high.  Anyone know of any methods that could solve this problem?



Let's look at what you have to work with:

366 bytes * 8 bits / byte = 2928 bits available

If your numbers can take any value between 0 and 127 (and no compression is possible), then the absolute most efficient way to pack them is to use 7 bits per number. So:

60 sequences * 18 numbers / sequence * 7 bits / number = 7560 bits required.

Doesn't promising, does it?
No technical questions via PM. They will be ignored. Post your questions in the forum so that all may learn.

Go Up