Compressing hex string into base64 string


How would you convert / compress 64 character long hex string (0-9a-f) into shortest possible web-safe-char string? (base64 chars is fine) The reverse algorithm must be able to “uncompress” resulting string back into original hex.

I have created p16Top64() compress algorithm and p64Top16() uncompress (reversed) algorithm based on ByteArray class and writeUnsignedInt(), readUnsignedInt() methods. Both p16Top64() and p64Top16() methods are now part of class. By using p16Top64() method I was able to compress original 64 chars into 44 chars. But, is it possible to compress it into less than 44 char long base64 (0-9a-Z/=) string?

Read the rest of this entry »