Can anyone suggest compression algorithms to operate on numeric strings of 20-30 digits ?
Can anyone suggest compression algorithms to operate on numeric strings of 20-30 digits ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.