chiark / gitweb /
base91-0.6.0.tar.gz downloaed just now
[base91.git] / PHP4 / README
1 base91_encode -- Encodes data with basE91
2
3         string base91_encode ( string data )
4
5 base91_encode() returns data encoded with basE91. This encoding is designed to
6 make binary data survive transport through transport layers that are not 8-bit
7 clean, such as mail bodies.
8
9 basE91-encoded data takes at most 23% more space than the original data.
10
11 Example:
12 <?php
13   require_once 'base91.php';
14   $str = 'This is an encoded string';
15   echo base91_encode($str);
16 ?>
17
18 This example will produce:
19
20 nX,<:WRT%yV%!5:maref3+1RrUb64^M
21
22 -----
23
24 base91_decode -- Decodes data encoded with basE91
25
26         string base91_decode ( string encoded_data )
27
28 base91_decode() decodes encoded_data ignoring non-alphabet characters and
29 returns the original data. The returned data may be binary.
30
31 Example:
32 <?php
33   require_once 'base91.php';
34   $str = 'nX,<:WRT%yV%!5:maref3+1RrUb64^M';
35   echo base91_decode($str);
36 ?>
37
38 This example will produce:
39
40 This is an encoded string