How to compress an hexadecimal number into a short string?

@BulldogLowell, thanks for spotting that. I have updated my Reply.

...R