Changeset 9678 in project


Ignore:
Timestamp:
03/14/08 23:43:49 (12 years ago)
Author:
sjamaan
Message:

Update stream-base64

Location:
wiki
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wiki/Hackathon1

    r9675 r9678  
    753753<tr>
    754754<td>stalin</td>
    755 <td></td>
    756 <td></td>
     755<td>Manpage?</td>
     756<td>Ask Felix</td>
    757757</tr>
    758758<tr>
    759759<td>stream-base64</td>
    760 <td></td>
    761 <td></td>
     760<td>HTML</td>
     761<td>[[Peter Bex]]</td>
    762762</tr>
    763763<tr>
  • wiki/stream-base64

    r1019 r9678  
    11[[tags: eggs streams base64 parsing]]
    22
    3 == Introduction
     3== stream-base64
     4
     5[[toc:]]
     6
     7=== Author
     8
     9Alejandro Forero Cuervo
     10
     11=== Documentation
    412
    513The stream-base64 egg allows you to encode and decode streams of bytes in base64.
    614
    7 == Examples
     15<procedure>(base64-decode stream)</procedure>
    816
    9 === Encoding a stream
     17Returns a stream of characters with the contents of {{stream}} after
     18decoding them.  {{stream}} should be a stream of characters encoded in
     19Base64.
    1020
    11 <enscript highlight=scheme>(use stream-base64)
     21<procedure>(base64-encode stream)</procedure>
    1222
     23Returns a stream of characters with the contents of
     24{{stream}} encoded in Base64.
     25
     26
     27=== Examples
     28
     29==== Encoding a stream
     30
     31<example>
     32<init>(use stream-base64)</init>
     33<expr>
    1334; Encode everything from current-input-port and write it:
    1435(write-stream
    1536  (base64-encode
    1637    (port->stream
    17       (current-input-port))))</enscript>
     38      (current-input-port))))
     39</expr>
     40</example>
    1841
    19 === Decoding a stream
     42==== Decoding a stream
    2043
    21 <enscript highlight=scheme>(use stream-base64)
    22 
     44<example>
     45<init>(use stream-base64)</init>
     46<expr>
    2347; Decode everything from current-input-port and write it:
    2448(write-stream
    2549  (base64-decode
    2650    (port->stream
    27       (current-input-port))))</enscript>
     51      (current-input-port))))
     52</expr>
     53</example>
     54
     55=== Changelog
     56
     57* 1.1 - added .setup script (felix)
     58* 1.0 (r1578) - First public release.
     59
     60=== License
     61
     62The Base64 egg for Chicken Scheme is in the public domain and may be
     63reproduced or copied without permission from its author.  Citation of
     64the source is appreciated.
Note: See TracChangeset for help on using the changeset viewer.