You are here: Re: hex to another base « PHP Programming Language « IT news, forums, messages
Re: hex to another base

Posted by Tim Roberts on 11/18/27 11:40

"Nel" <nelly@ne14.co.NOSPAMuk> wrote:
>
>In this cas I am trying to pass a shorter URL and moving from base 16 to 62
>knocks off about 10 chars from the URL. Not as many as I'd hoped for, but
>it's a definate improvement.

You don't have to "hope", you can compute this. The number of bits per
digit is the logarithm in base 2 of the number base. Base 16 packs 4 bits
per digit. Base 62 packs 5.9 bits per digit. The string will be about 1/3
shorter.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация