Compressed data packets.
Version: 1.03Crypt::OpenPGP::Compressed is a Perl module with compressed data packets.
License: Perl Artistic License
Operating System: Linux
my $cdata = Crypt::OpenPGP::Compressed->new( Data => $data );
my $serialized = $cdata->save;
my $cdata = Crypt::OpenPGP::Compressed->parse($buffer);
my $data = $cdata->decompress;
Crypt::OpenPGP::Compressed implements compressed data packets, providing both compression and decompression functionality, for all supported compression algorithms (Zlib and ZIP). This class uses Compress::Zlib for all compression/decompression needs for both algorithms: ZIP is simply Zlib with a different setting for the WindowBits parameter.
Decompressing a compressed data packet should always yield a stream of valid PGP packets (which you can then parse using Crypt::OpenPGP::PacketFactory). Similarly, when compressing a packet the input data should be a stream of packets.