Convert::Z85 - Encode and decode Z85 strings
use Convert::Z85; my $encoded = encode_z85($binarydata); my $decoded = decode_z85($encoded);
An implementation of the Z85 encoding scheme (as described in ZeroMQ spec 32) for encoding binary data as plain text.
Modelled on the PyZMQ implementation.
This module uses Exporter::Tiny to export two functions by default: "encode_z85" and "decode_z85".
my $z85 = encode_z85($data);
Takes binary data in 4-byte chunks and returns a Z85-encoded text string.
Per the spec, padding is not performed automatically; the pad option can be specified to pad data with trailing zero bytes:
my $z85 = encode_z85($data, pad => 1);
my $bin = decode_z85($encoded);
Takes a Z85 text string and returns the original binary data.
Dies (with a stack trace) if invalid data is encountered.
Padding (see "encode_z85") is not handled automatically; the pad option can be specified to remove trailing zero bytes:
my $bin = decode_z85($encoded, pad => 1);
Convert::Ascii85
POEx::ZMQ
ZMQ::FFI
Jon Portnoy <avenj@cobaltirc.org>
To install Convert::Z85, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Convert::Z85
CPAN shell
perl -MCPAN -e shell install Convert::Z85
For more information on module installation, please visit the detailed CPAN module installation guide.