I want to find patterns in a string for compression.
Lets say I have a string, “abcdabcr”.
I want to find repeating patterns of length 2 or more, eg abc, not overlapping.
How can I do this?
I have tried searching this, but it is hard to find answers.