I only have about 4KB of RAM to play around with as I recall.
I want to store hundreds of different words, graphics and code.
I need to pack words in to memory efficiently.
The problem is that there are 26 letters in the alphabet which takes up fives of memory.
Which is inefficient.
And I would need some complex code to decipher every five bits in a stream.
Because it is a word search I have a limited number of words to be searching for within a theme.
If I choose my words carefully so that all of the words only use 16 different letters then I can pack two letters in to a single byte.
Assume three bits to indicate word length.
But the word length value 0 through 7 is added to a base value of 3.
No word will be shorter than three letters.
So that gives me words between 3 letters and 10 letters in length.
That gives me four bits to store the first letter of the word and one bit left over.
Footnote: The problem I was trying to solve back then was how to store hundreds of words in as small an amount of memory as I can.