Compression depends on data structures filled with repeated pieces. Lossy compression improves the hit rate of repeated pieces by replacing rare pieces with similar, common pieces. In the case of colours, naive lossy compression means "Apricot" and "Burnt Sienna" both become "Orange", which becomes "Org". "Chartreuse" and "Pistachio" both become "Lime", which gets abbreviated to "Lm". A final list of all the colours gets tallied at the end, and colours like "Orange" and "Lime" may get abbreviated all the way down to "O" and "L".
> "The point isn't how many words you're using, but how repetitiously those words appear."
Not under the compression scheme barakm is proposing, which is to fix a universal dictionary (the commonest 1k or 64k English words across some very wide corpus), so that you don't have to transmit it.
Under the 64k scheme, every word is 2B, but you probably have to use a few more words. It's a naive scheme, but a very comprehensible one, and relatively useful for shorter texts.
As an alternative, sure, you can make a custom dictionary, in which case you can use whatever words you like, as long as you can keep the distinct number down, and ideally heavily-repeat certain words. This results in a larger filesize for small messages, because you have to start by sending the dictionary, but a much better filesize for nearly any large message.
Or, hmn. I guess you could allow recursive compression, or back-references, or something, so that you could compress repetition of word-sequences.
And, hmn, that might not always work out. Well, look, you could allocate the first byte of the message to switching between compression schemes, so that you can choose between 256 different schemes, and choose the best one.
Oh look, if I keep this up for another hour or two, maybe I'll catch up to the state of the art from before I was born. No, I don't know what wavelets are, nor who Fourier is, why do you ask?
Anyway, popping out of fake-naive mode, my point is that Huffman compression isn't the only compression technique.
Compression depends on data structures filled with repeated pieces. Lossy compression improves the hit rate of repeated pieces by replacing rare pieces with similar, common pieces. In the case of colours, naive lossy compression means "Apricot" and "Burnt Sienna" both become "Orange", which becomes "Org". "Chartreuse" and "Pistachio" both become "Lime", which gets abbreviated to "Lm". A final list of all the colours gets tallied at the end, and colours like "Orange" and "Lime" may get abbreviated all the way down to "O" and "L".