From: Martin Rubey
Subject: Base32 encoder needed
Date: 
Message-ID: <9qy7kj8n1s.fsf_-_@aquin.mat.univie.ac.at>
Dear all,

finally I know what I want: a base32 encoder. Anybody has one available?

thanks,

Martin

From: ··@codeartist.org
Subject: Re: Base32 encoder needed
Date: 
Message-ID: <1177321752.928611.88660@n59g2000hsh.googlegroups.com>
On 23 Apr., 11:20, Martin Rubey <············@univie.ac.at> wrote:
> Dear all,
>
> finally I know what I want: a base32 encoder. Anybody has one available?

How about

(let ((*print-base* 32)) (print 1234)) ?

ciao,
Jochen
From: Harald Hanche-Olsen
Subject: Re: Base32 encoder needed
Date: 
Message-ID: <pco647nuyab.fsf@shuttle.math.ntnu.no>
+ ···@codeartist.org" <··@codeartist.org>:

| On 23 Apr., 11:20, Martin Rubey <············@univie.ac.at> wrote:
|> Dear all,
|>
|> finally I know what I want: a base32 encoder. Anybody has one available?
|
| How about
|
| (let ((*print-base* 32)) (print 1234)) ?

Probably not what the OP had in mind.  See RFC 4648 and

  http://en.wikipedia.org/wiki/Base_32

It's probably easiest to knock one together yourself.
The specification isn't that hard, really.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell
From: Martin Rubey
Subject: Re: Base32 encoder needed
Date: 
Message-ID: <9qy7kj1enh.fsf@aquin.mat.univie.ac.at>
Harald Hanche-Olsen <······@math.ntnu.no> writes:

> + ···@codeartist.org" <··@codeartist.org>:
> 
> | On 23 Apr., 11:20, Martin Rubey <············@univie.ac.at> wrote:
> |> Dear all,
> |>
> |> finally I know what I want: a base32 encoder. Anybody has one available?
> |
> | How about
> |
> | (let ((*print-base* 32)) (print 1234)) ?
> 
> Probably not what the OP had in mind.  See RFC 4648 and
> 
>   http://en.wikipedia.org/wiki/Base_32
> 
> It's probably easiest to knock one together yourself.
> The specification isn't that hard, really.

Well, I ressorted to md5sum meanwhile.  Although it's not really bijective (not
even injective...), it should be sufficient for what I need.

Here is what I want to do, just in case:

I have a string like 

ostretch`2`x`(_$,ACMachineInteger)->_$`dCycleIndexSeries``

and need to convert it into a filename, preferably in a way such that case
doesn't matter.  Furthermore, since these strings get rather long, some sort of
compression would be desirable.  It seems that md5sum does it just right.
Although I must admit that it would be *very* annoying to have two strings give
the same checksum, and I have no idea how likely this is.

So, my first idea was to use gzip on the the string and convert the result
using base32. Very likely though, that's much too complicated.

many thanks for your help,

Martin

PS: in case somebody else cares: I found cl-base64.  Probably that could be
tuned to cover base32 as well.
From: Harald Hanche-Olsen
Subject: Re: Base32 encoder needed
Date: 
Message-ID: <pcomz0z9ier.fsf@shuttle.math.ntnu.no>
+ Martin Rubey <········@yahoo.de>:

| It seems that md5sum does it just right.
| Although I must admit that it would be *very* annoying to have two
| strings give the same checksum, and I have no idea how likely this
| is.

Let us say: Extremely unlikely.  MD5 is designed as a cryptographic
hash, which means it should be computationally infeasible to find two
distinct strings hashing to the same value.  Unfortunately MD5 has
been broken,� but for your purposes it should be more than sufficient.
Heck, any CRC with a sufficient number of bits should be sufficient,
though it has no cryptographic strength at all.

� http://en.wikipedia.org/wiki/Md5

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell