Mostly as an exercise, implement a compression algorithm.
Akin to RLE (Run-Length Encoding) and double RLE:
Find the longest repeating substring. Replace it with a special symbol. Store the mapping.
Stretch goal: pick most effective replacement by calculating char saving and sorting on that.
Additionally, generate the self-uncompressing snippet.
Mostly as an exercise, implement a compression algorithm.
Akin to RLE (Run-Length Encoding) and double RLE: Find the longest repeating substring. Replace it with a special symbol. Store the mapping. Stretch goal: pick most effective replacement by calculating char saving and sorting on that.
Additionally, generate the self-uncompressing snippet.