Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: base64 coding for zsh ?
- X-seq: zsh-users 10717
- From: "Brian K. White" <brian@xxxxxxxxx>
- To: <zsh-users@xxxxxxxxxx>
- Subject: Re: base64 coding for zsh ?
- Date: Thu, 14 Sep 2006 21:49:06 -0400
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Aljex Software
- References: <20060912150813.GA4937@xxxxxxxxxxxxxxxxxx> <060912182718.ZM24284@xxxxxxxxxxxxxxxxxxxxxx> <20060913150818.GA9450@xxxxxxxxxxxxxxxxxx> <03ba01c6d793$d3bd7110$6500000a@venti> <20060914145038.GC13332@xxxxxxxxxxxxxxxxxx>
----- Original Message -----
From: "Marc Chantreux" <marc.chantreux@xxxxxxxxxxxxxxxxxx>
To: <zsh-users@xxxxxxxxxx>
Sent: Thursday, September 14, 2006 10:50 AM
Subject: Re: base64 coding for zsh ?
le 13/09/2006,
Brian K. White nous crivait :
Sent: Wednesday, September 13, 2006 11:08 AM
alias B64enc='openssl base64'
alias B64dec='openssl base64 -d'
I've been using the stand-alone:
http://www.fourmilab.ch/webtools/base64/
I never realised I already had it in openssl.
Thanks for the tip.
I didn't know that before yesterday but it was a bad idea in fact :
openssl base64 doesn't handle utf8 encoded content. So i found recode
command.
finaly :
alias b64dec='recode b64..data'
alias b64enc='recode data..b64'
benches are welcome ;)
---------
Not good but not horrible.
Consistently slower than everything else but only microscopically.
Even though it's the slowest of all, you still have to call it "fast".
nj4:~ # time recode data..b64 </boot/vmlinuz >/dev/null
real 0m0.086s
user 0m0.080s
sys 0m0.008s
nj4:~ #
Brian K. White -- brian@xxxxxxxxx -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
Messages sorted by:
Reverse Date,
Date,
Thread,
Author