Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: shorten "compress" long integer to short ascii. Date: Fri, 20 Nov 2015 15:55:54 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 21 Message-ID: References: <871tbll2hw.fsf@nightsong.com> NNTP-Posting-Host: 67-130-15-94.dia.static.qwest.net Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: reader1.panix.com 1448034954 28326 67.130.15.94 (20 Nov 2015 15:55:54 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Fri, 20 Nov 2015 15:55:54 +0000 (UTC) User-Agent: slrn/1.0.2 (Linux) Xref: csiph.com comp.lang.python:99159 On 2015-11-20, Vincent Davis wrote: > On Thu, Nov 19, 2015 at 9:27 PM, Paul Rubin 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