() Andy Wingo <wi...@pobox.com> () Mon, 06 Sep 2010 11:59:15 +0200 Perhaps we could combine interfaces -- the stream-based (I presume; I haven't seen your code yet, but I know your Scheme code looks good) interfaces from yours, and the map-3-to-4 stuff from Andreas' R6RS port of my base64.scm.
I say this because the r6rs port already uses bytevectors, and compiles down to fairly tight VM code. I haven't run benchmarks though. Please find below a five-minute port of (ice-9 base64) to Guile 1.9.x. To play, write it to /tmp and try something like: $ cd /tmp $ cat > hack <<EOF (use-modules (ice-9 base64)) (base64-encode #t (open-input-file "/tmp/hack") 44) (newline) EOF $ base64 -w 44 hack > A $ guile -l base64.scm -s hack | diff A - Probably the next step is to settle the interface. I am biased towards 1.4.x compatability but am open (albeit reluctantly) to breaking it. Once the interface is settled, i'll add docs and some perfunctory tests and repost. WRT performance -- feel free to rewrite things afterwards; i'm not yet up to speed (har har) on this area of Guile development enough to help more than hinder.
base64.scm
Description: Binary data