Compression of numeric strings
algorithm, compression
Solution
Assuming you can have floating point numbers, you have a possibility of 11 symbols:
`[0,1,2,3,4,5,6,7,8,9, .]`
This means that you need 4 bits per symbol. 3 bits can only represent a maximum of 8 symbols. You can easily use 4 bits per each symbol and get a lot of compression.
If you only have integer digits in your string, an easy solution is to convert to hexidecimal and you can use 4 bits per symbol still while getting a better compression ratio. (since there are no wasted bits with 16 symbols)
If you use Huffman compression you will get an optimal bits/per symbol ratio. You can read more about Huffman compression here.
Problem
Can anyone suggest compression algorithms to operate on numeric strings of 20-30 digits ?