shorten a uuid to a shorter representation and back