Convert::Ascii85(3pm)

πŸ“¦
version 0.01 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Convert::Ascii85 β€” the perl manual page, but make it make sense πŸ’–

okay so bestie, this is the User Contributed Perl Documentation page for Convert::Ascii85, and honestly? it's giving "tiny module, huge slay." let's get into it πŸŽ€


✨ NAME ✨

Convert::Ascii85 β€” encoding and decoding of ascii85/base85 strings. that's it, that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

here's how you actually use it, two whole ways:

use Convert::Ascii85;

my $encoded = Convert::Ascii85::encode($data);
my $decoded = Convert::Ascii85::decode($encoded);

or, if you want the short names exported into your namespace:

use Convert::Ascii85 qw(ascii85_encode ascii85_decode);

my $encoded = ascii85_encode($data);
my $decoded = ascii85_decode($encoded);

pick your fighter. both iconic. πŸ’…


✨ DESCRIPTION ✨

so this module implements the Ascii85 algorithm (also known as Base85) for encoding binary data as text. the way it works is: it takes each group of four bytes and reads it as a 32-bit integer, then converts that into a five-digit base-85 representation using the digits from ASCII 33 ("!") all the way up to 117 ("u"). cute, efficient, obsessed. 😌

it's similar to MIME::Base64 but more space efficient: the overhead is only 1/4 of the original data (as opposed to 1/3 for Base64). less bloat, more room for your data's main character era. πŸ”₯


✨ FUNCTIONS ✨

πŸ’« Convert::Ascii85::encode DATA

πŸ’« Convert::Ascii85::encode DATA, OPTIONS

converts the bytes in DATA to Ascii85 and returns the resulting text string. ✨

OPTIONS is a hash reference where you can set these keys:

  • compress_zero => 0 β€” by default, four-byte chunks of null bytes ("\0\0\0\0") get squished into 'z' instead of '!!!!!'. if you're not about that life, pass a false value for "compress_zero" in OPTIONS and it won't do that.
  • compress_space => 1 β€” by default, four-byte chunks of spaces (' ') are converted to '+<VdL'. but if you pass a true value for "compress_space" in OPTIONS, they'll be converted to 'y' instead. your call, bestie.

also, this function may be exported as "ascii85_encode" into the caller's namespace. 🫢

πŸ’« Convert::Ascii85::decode TEXT

converts the Ascii85-encoded TEXT back to bytes and returns the resulting byte string. spaces and linebreaks in TEXT are ignored, so go ahead and format it however, she doesn't care. πŸ™ˆ

this function may be exported as "ascii85_decode" into the caller's namespace. 🫢


✨ SEE ALSO ✨

iykyk 🌈


✨ AUTHOR ✨

Lukas Mai, "<l.mai at web.de>" β€” the icon who wrote all this. πŸ‘‘


✨ BUGS ✨

if you find a bug or want a feature, please report it to "bug-convert-ascii85 at rt.cpan.org", or through the web interface at:

<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Convert-Ascii85>

he'll get notified, and then you'll automatically get notified of progress on your bug as he makes changes. closed loop, no ghosting. πŸ’€


✨ SUPPORT ✨

you can find documentation for this module with the perldoc command:

perldoc Convert::Ascii85

you can also look for info at these spots:

go on, poke around. 🌸


Copyright 2011 Lukas Mai.

this program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

see http://dev.perl.org/licenses/ for more information. ⭐

legally required, spiritually iconic. no cap. 🧚

and that's the whole page bestie!! this was Convert::Ascii85(3pm), the User Contributed Perl Documentation version, perl v5.36.0, dated 2022-10-13. go forth and encode responsibly πŸ’œπŸŒΈπŸ’–

πŸ“¦ where this page comes from