Base-40 implementation in Java. Useful for packing a readable small string in a Java long.