zsh-users
 help / color / mirror / code / Atom feed
From: "Brian K. White" <brian@aljex.com>
To: <zsh-users@sunsite.dk>
Subject: Re: base64 coding for zsh ?
Date: Thu, 14 Sep 2006 21:49:06 -0400	[thread overview]
Message-ID: <019b01c6d869$30d99790$6c00000a@venti> (raw)
In-Reply-To: <20060914145038.GC13332@ulpmm.u-strasbg.fr>


----- Original Message ----- 
From: "Marc Chantreux" <marc.chantreux@ulpmm.u-strasbg.fr>
To: <zsh-users@sunsite.dk>
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@aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!


      parent reply	other threads:[~2006-09-15  1:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-12 15:08 Marc Chantreux
2006-09-13  1:27 ` Bart Schaefer
2006-09-13 15:08   ` Marc Chantreux
2006-09-14  0:21     ` Brian K. White
     [not found]       ` <20060914003316.GD8475@lorien.comfychair.org>
2006-09-14  4:05         ` Brian K. White
2006-09-14 14:50       ` Marc Chantreux
2006-09-14 15:49         ` Bart Schaefer
2006-09-15  1:49         ` Brian K. White [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='019b01c6d869$30d99790$6c00000a@venti' \
    --to=brian@aljex.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).