I was wondering if this compression method already exists:
If we have a sequence of bytes, we translate them into offsets pointing backwards at the nearest occurence of the same byte (kind of like in normal LZ compression).
For example, following sequence:
could translate into:
In the result, frequent bytes turn into smaller numbers which can be stored in less bits - just like in Huffman. Infrequent bytes can turn into numbers larger than 255.
Compared to Huffman, you avoid building a huffman tree and the method also adapts to changes in frequency through the data.
I've tested it in practise with mixed results on different kinds of data...
For now, I just wanted to know if it was already existing