Math::Base85(3pm)
π NAME π
Math::Base85 β a Perl extension for base 85 numbers, as referenced by RFC 1924. bestie, it's giving hexadecimal's cooler older sister β¨
πΈ SYNOPSIS πΈ
use Math::Base85;
$bigint = from_base85($number);
$b85str = to_base85($bigint);
π¦ DESCRIPTION π¦
okay so RFC 1924 describes a compact, fixed-size way to represent IPv6 addresses, and it uses a base 85 number system. this module handles some of the uglier details of that for you, no cap π
the base 85 numbers (from 0 to 84) go like this, and honestly the alphabet is so chaotic, periodt:
0..9 A..Z a..z ! # $ % & ( ) * + - ; < = > ? @ ^ _ ` { | } ~
at the moment there's not much in this module (it's a short king π), but it should be sufficient for the purposes of RFC 1924, fr fr.
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, iykyk π«Ά)
π from_base85 π
Parameters
a string composed of valid base 85 digits. β¨
Returns
a "Math::BigInt" object representing the number. slay.
π§ to_base85 π§
Parameters
a "Math::BigInt" object. π
Returns
a string of base 85 digits representing the number. iconic.
π AUTHORS π
- Tony Monroe
<tmonroe+perl@nog.net>π - Paul Cochrane
<paul@liekut.de>(maintainer) π«Ά
β 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 π₯
that's the whole vibe check, bestie π
and just so we're keeping the receipts, this page is from perl v5.36.0, dated 2022-10-22, and it lives under the name Math::Base85(3pm). stay iconic, go read it again if you forgot something π
β¨πΈ
π¦ where this page comes from
- ubuntu noble: libmath-base85-perl 0.5+dfsg-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmath-base85-perl 0.5+dfsg-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmath-base85-perl 0.5+dfsg-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms