This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: rfc 2045 base64 encoding/decoding module
oops, error from bad habit;
(+1 index) -> (set! index (1+ index))
the code should have been:
;; TODO: decide whether looping is better here
(string-set! outstr
index
(hashv-ref base64-table (bit-extract 24bits 0 5)))
(set! index (1+ index))
(string-set! outstr
index
(hashv-ref base64-table (bit-extract 24bits 6 11)))
(set! index (1+ index))
(string-set! outstr
index
(hashv-ref base64-table (bit-extract 24bits 12 17)))
(set! index (1+ index))
(string-set! outstr
index
(hashv-ref base64-table (bit-extract 24bits 18 23)))
(set! index (1+ index))
(set! str (substring str 3)))