How to compress an hexadecimal number into a short string?

Robin2:
Help us to help you. Post the complete program that gave rise to the error mentioned in Reply #17 and don't expect us to stitch things together - mainly because we might make a mistake while doing so.
...R

It's definitely a lot easier to copy / paste into the IDE if you only have to copy from one place.