Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #99159

Re: shorten "compress" long integer to short ascii.

From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: shorten "compress" long integer to short ascii.
Date 2015-11-20 15:55 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <n2nfq9$rl6$1@reader1.panix.com> (permalink)
References <mailman.503.1447991136.16136.python-list@python.org> <871tbll2hw.fsf@nightsong.com> <mailman.517.1448029163.16136.python-list@python.org>

Show all headers | View raw


On 2015-11-20, Vincent Davis <vincent@vincentdavis.net> wrote:
> On Thu, Nov 19, 2015 at 9:27 PM, Paul Rubin <no.email@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            

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

shorten "compress" long integer to short ascii. Vincent Davis <vincent@vincentdavis.net> - 2015-11-19 20:45 -0700
  Re: shorten "compress" long integer to short ascii. Paul Rubin <no.email@nospam.invalid> - 2015-11-19 20:27 -0800
    Re: shorten "compress" long integer to short ascii. Vincent Davis <vincent@vincentdavis.net> - 2015-11-20 07:18 -0700
      Re: shorten "compress" long integer to short ascii. Grant Edwards <invalid@invalid.invalid> - 2015-11-20 15:55 +0000

csiph-web