zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users <zsh-users@sunsite.dk>
Subject: Re: base64 coding for zsh ?
Date: Tue, 12 Sep 2006 18:27:18 -0700	[thread overview]
Message-ID: <060912182718.ZM24284@torch.brasslantern.com> (raw)
In-Reply-To: <20060912150813.GA4937@ulpmm.u-strasbg.fr>

On Sep 12,  5:08pm, Marc Chantreux wrote:
}
} Now i want my function to deal with base64. The fact is, i don't know
} how to do it.
} 
} Someone can help ? 

It's about 50 lines of readably-formatted C code to write a base64
decoder, 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.

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

enB64 abcdef
deB64 YWJjZGVm


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

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=060912182718.ZM24284@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).