Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Math::Base85

Name Math::Base85
Version 0.5
Located at /usr/share/perl5
File /usr/share/perl5/Math/Base85.pm
Is Core No
Search CPAN for this module Math::Base85
Documentation Math::Base85
Module Details Math::Base85

NAME

Math::Base85 - Perl extension for base 85 numbers, as referenced by RFC 1924


SYNOPSIS

  use Math::Base85;
  $bigint = from_base85($number);
  $b85str = to_base85($bigint);


DESCRIPTION

RFC 1924 describes a compact, fixed-size representation of IPv6 addresses which uses a base 85 number system. This module handles some of the uglier details of it.

The base 85 numbers (from 0 to 84) are as follows:

    0..9 A..Z a..z ! # $ % & ( ) * + - ; < = > ? @ ^ _ ` { | } ~

At the moment, there's not much in this module. But it should be sufficient for the purposes of RFC 1924.

This module has a variable called $Math::Base85::base85_digits, which is a string containing the digits of the base 85 alphabet from lowest (0) to highest (~), in that order.

Additionally, the following two functions are defined for general use. (They will be exported upon request.)


from_base85

Parameters

A string composed of valid base 85 digits.

Returns

A Math::BigInt object representing the number.


to_base85

Parameters

A Math::BigInt object.

Returns

A string of base 85 digits representing the number.


AUTHORS


COPYRIGHT AND LICENSE

Copyright (c) 2001-2002, Tony Monroe <tmonroe+perl@nog.net>. All rights reserved. Copyright (c) 2017, Paul Cochrane <paul@liekut.de>. All rights reserved.

You may use this software under the same terms as Perl itself.


SEE ALSO

perl(1).

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026