What type of encoding can I use to make a string shorter?
- by Abe Miessler
I am interested in encoding a string I have and I am curious if there is a type of encoding that can be used that will only include alpha and numeric characters and would preferably shorten the number of characters needed to represent the string.
So far I have looked at using Base64 encoding to do this but it appears to make my string longer and sometimes includes == which I would like to avoid. Example:
test name|120101
becomes
dGVzdCBuYW1lfDEyMDEwMQ==
which goes from 16 to 24 characters and includes non-alphanumeric.
Does anyone know of a different type of encoding that I could use that will achieve my requirements? Bonus points if it's either built into the .NET framework or there exists a third party library that will do the encoding.