The standard string representation of GUID takes about 36 characters. Which is very nice, but also really wasteful. I am wondering, how to encode it in the shortest possible way using all the ASCII characters in the range 33-127. The naive implementation produces 22 characters, simply because 128 bits / 6 bits yields 22.
Huffman encoding is my second best, the only question is how to choose the codes….
The encoding must be lossless, of course.
Use Base 85.
See section 4.1. Why 85? of A Compact Representation of IPv6 Addresses
An IPv6 address, like a GUID is made up of eight 16-bit pieces.