Changeset 14444 in project


Ignore:
Timestamp:
04/25/09 19:18:48 (11 years ago)
Author:
Jim Ursetto
Message:

base64: actually document port I/O...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/base64

    r14443 r14444  
    88== Documentation
    99
    10 <procedure>(base64-encode STRING)</procedure>
     10<procedure>(base64-encode IN [OUT])</procedure>
    1111
    12 Returns {{STRING}} encoded as base64 text (a string).
     12Encodes {{IN}} (a string or port) to base64 text on optional output port {{OUT}}, and returns {{OUT}}.
    1313
    14 <procedure>(base64-decode STRING)</procedure>
     14If the output port is omitted, the encoded output is written to a fresh string and returned.
    1515
    16 Returns the decoded string from the base64 data {{STRING}}.  Invalid input data is silently skipped.
     16<procedure>(base64-decode IN [OUT])</procedure>
     17
     18Decodes base64 text from {{IN}} (a string or port) to optional output port {{OUT}}, and returns {{OUT}}.  Invalid input data is silently skipped.
     19
     20If the output port is omitted, the decoded output is written to a fresh string and returned.
    1721
    1822<parameter>(base64-line-breaks BOOLEAN) [default: #f]</parameter>
     
    3135                                   (open-output-string)))
    3236    ; => "dGhlcXVpY2ticm93bmZveGp1bXBzb3ZlcnRoZWxhenlkb2c="
     37 (base64-encode s (current-output-port))
     38 dGhlcXVpY2ticm93bmZveGp1bXBzb3ZlcnRoZWxhenlkb2c=        ; stdout
    3339
    3440A script that encodes a file given on the command-line in the style of {{uuencode -m}}.
Note: See TracChangeset for help on using the changeset viewer.