shorten "compress" long integer to short ascii.

Grant Edwards invalid at invalid.invalid
Fri Nov 20 10:55:54 EST 2015


On 2015-11-20, Vincent Davis <vincent at vincentdavis.net> wrote:
> On Thu, Nov 19, 2015 at 9:27 PM, Paul Rubin <no.email at nospam.invalid> wrote:
>
>> You can't improve much.  A decimal digit carries log(10,2)=3.32 bits
>> of information.  A reasonable character set for Twitter-style links
>> might have 80 or so characters (upper/lower alphabetic, digits, and
>> a dozen or so punctuation characters), or log(80,2)=
>>
>
> ​Where do I find out more about the how to calculate information per
> digit?

There are 10 possible states for a decimal digit.

The number of digits required to represent N states in base M is
log(N,M).

-- 
Grant Edwards               grant.b.edwards        Yow! Are we on STRIKE yet?
                                  at               
                              gmail.com            



More information about the Python-list mailing list