Even if this is not a true compression, the word compression though implies less characters (or the same) so you could make an assumption that for characters repeated less than 3 times there is no need to compress them. so
asdf will stay asdf
aasdff will stay aasdff
aasssdfff will become aas3df3
and when compressing numbers you could use a token approach
Even if this is not a true compression, the word compression though implies less characters (or the same) so you could make an assumption that for characters repeated less than 3 times there is no need to compress them. so
and when compressing numbers you could use a token approach
Yep, we could compare if the "compressed" version is indeed shorter and if it's shorter then use that one.