For example I have a file with AAABBBCCC I'd like to see ABC, but sometimes there is ABABBCA and I'd like to get ABABCA. How could I dedup that?