How can I compress strings such that :
- input is lowercase alphanumeric and the dot character
- output must be alphanumeric mixed case only
The input is short and has no repetition
How can I compress strings such that :
The input is short and has no repetition
2
Answers
Something like this could work if I understand it correctly:
To be honest this is probably very basic example but you can use it as start I guess.
Your input can contain 37 different characters (lowercase letters, digits, dot), which can be expressed with 6 bits per character.
Your output can contain 62 different characters (upper- and lowercase letters and digits), which suggests a base62 encoding.
A corresponding decoding function can also be written.