Outdated egg!

This is an egg for CHICKEN 3, the unsupported old release. You're almost certainly looking for the CHICKEN 4 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.

  1. Outdated egg!
  2. Description
  3. Documentation
  4. Examples
  5. About this egg
    1. Author
    2. Version history
    3. License

Description

Parsing and unparsing of base64 strings.

Documentation

'''procedure:''' (base64:encode STRING)

Returns STRING encoded as base64 text (a string).

'''procedure:''' (base64:decode STRING)

Returns the decoded string from the base64 data STRING.

Examples

(define s "thequickbrownfoxjumpsoverthelazydog")

(base64:encode s)
  ;=> "dGhlcXVpY2ticm93bmZveGp1bXBzb3ZlcnRoZWxhenlkb2c="

(base64:decode (base64:encode s))
  ;=> "thequickbrownfoxjumpsoverthelazydog"

About this egg

Author

Version history

2.2
Fix encoding problem with chars > 127 [zb]
2.1
Ported to hygienic Chicken [Peter Bex]
2.0
Reimplemented in C for large speedup. [zbigniew]
1.3
Replaced implementation with a much faster version by James Bailey
1.2
Removed read syntax
1.1
Decoding accepts whitespace now.
1.0
Initial release.

License

Copyright (c) 2004 James Bailey.
Copyright (c) 2008 Jim Ursetto.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.