1Base85(3) User Contributed Perl Documentation Base85(3)
2
3
4
6 Math::Base85 - Perl extension for base 85 numbers, as referenced by RFC
7 1924
8
10 use Math::Base85;
11
12 $bigint = from_base85($number);
13 $b85str = to_base85($bigint);
14
16 RFC 1924 describes a compact, fixed-size representation of IPv6
17 addresses which uses a base 85 number system. This module handles some
18 of the uglier details of it.
19
20 The base 85 numbers (from 0 to 84) are as follows:
21
22 0..9 A..Z a..z ! # $ % & ( ) * + - ; < = > ? @ ^ _ ` { ⎪ } ~
23
24 At the moment, there's not much in this module. But it should be suf‐
25 ficient for the purposes of RFC 1924.
26
27 This module has a variable called $Math::Base85::base85_digits, which
28 is a string containing the digits of the base 85 alphabet from lowest
29 (0) to highest (~), in that order.
30
31 Additionally, the following two functions are defined for general use.
32 (They will be exported upon request.)
33
35 Parameters
36
37 A string composed of valid base 85 digits.
38
39 Returns
40
41 A "Math::BigInt" object representing the number.
42
44 Parameters
45
46 A "Math::BigInt" object.
47
48 Returns
49
50 A string of base 85 digits representing the number.
51
53 Tony Monroe <tmonroe+perl@nog.net>
54
56 perl(1).
57
58
59
60perl v5.8.8 2002-08-06 Base85(3)