zsh-users
 help / color / mirror / code / Atom feed
From: Marc Chantreux <marc.chantreux@ulpmm.u-strasbg.fr>
To: zsh-users <zsh-users@sunsite.dk>
Subject: Re: base64 coding for zsh ?
Date: Wed, 13 Sep 2006 17:08:18 +0200	[thread overview]
Message-ID: <20060913150818.GA9450@ulpmm.u-strasbg.fr> (raw)
In-Reply-To: <060912182718.ZM24284@torch.brasslantern.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 886 bytes --]

le 12/09/2006,
Bart Schaefer nous écrivait :
> It's about 50 lines of readably-formatted C code to write a base64
> decoder,

so i'll write my first zsh module. It's added to my todo list. 

> slightly more than that to write the encoder, not counting the
> lookup tables. It could be done in shell script, but it would be very
> slow and probably not worth the effort.

ok, i give this solution away.

> alias enB64="perl -MMIME::Base64 -e 'print encode_base64(shift @ARGV)'"
> alias deB64="perl -MMIME::Base64 -e 'print decode_base64(shift @ARGV)'"

well ... i think perl is quite huge for this problem. I'll use openssl
as temporary hack.

alias B64enc='openssl base64'
alias B64dec='openssl base64 -d'

thanks for help.

regards.

-- 
téléphone : 03.90.24.00.19
courriel  : marc.chantreux@ulpmm.u-strasbg.fr
---------------------------------------


  reply	other threads:[~2006-09-13 15:08 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 [this message]
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

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=20060913150818.GA9450@ulpmm.u-strasbg.fr \
    --to=marc.chantreux@ulpmm.u-strasbg.fr \
    --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).