Algorithm

Kenneth Brody kenbrody at bestweb.net
Thu Mar 29 12:56:19 PDT 2007


Quoting Don Coleman (Thu, 29 Mar 2007 15:25:29 -0400):
[...]
> "Compress" the 15-18 digit # into a 8-10 digit # via application of
> an algorithm and "uncompress" it as needed.  I'm guessing this would
> involve use of letters in addition to strictly #'s.

Definitely.  You can't put an 18-digit number into 10 digits, without
increasing the number of symbols available per "digit".

> Unsure if this type of intelligence is available.  I checked the phone
> book but could not locate the local algorithm store.  Google lists many
> sites, beginning with Wikipedia examples, but I've never been a fan of
> this source.

Split the 18-digit number into two 9-digit numbers, and use BASE() to
convert from decimal to base 36.  You will now have a maximum of 6
"digits" each, giving you 12 "digits" total.  If you need to limit it
to 10 digits total, you'll need to go some other route.  One way is
to convert to raw binary, where 9 decimal digits fit into 4 bytes,
so your 18 digits would fit into 8 bytes.

[...]

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list