GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CRYPT::OPENPGP::COMPRESSED (3)

.ds Aq ’

NAME

Crypt::OpenPGP::Compressed - Compressed data packets

CONTENTS

SYNOPSIS



    use Crypt::OpenPGP::Compressed;

    my $data = serialized openpgp packets;
    my $cdata = Crypt::OpenPGP::Compressed->new( Data => $data );
    my $serialized = $cdata->save;



DESCRIPTION

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.

USAGE

Crypt::OpenPGP::Compressed->new( CW%arg )

Creates a new compressed data packet object and returns that object. If there are no arguments in %arg, the object is created with an empty compressed data container; this is used, for example, in parse (below), to create an empty packet which is then filled with the data in the buffer.

If you wish to initialize a non-empty object, %arg can contain:
o Data

A block of octets that make up the data that you wish to compress. As mentioned above, the data to compress should always be a stream of valid PGP packets (saved using Crypt::OpenPGP::PacketFactory::save).

This argument is required (for a non-empty object).

o Alg

The name (or ID) of a supported PGP compression algorithm. Valid names are Zlib and ZIP.

This argument is optional; by default Crypt::OpenPGP::Compressed will use ZIP.

CW$cdata->save

Returns the serialized compressed data packet, which consists of a one-octet compression algorithm ID, followed by the compressed data.

    Crypt::OpenPGP::Compressed->parse($buffer)

Given $buffer, a Crypt::OpenPGP::Buffer object holding (or with offset pointing to) a compressed data packet, returns a new Crypt::OpenPGP::Compressed object, initialized with the data from the buffer.

CW$cdata->decompress

Decompresses the compressed data in the Crypt::OpenPGP::Compressed object $cdata and returns the decompressed data.

AUTHOR & COPYRIGHTS

Please see the Crypt::OpenPGP manpage for author, copyright, and license information.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CRYPT::OPENPGP::COMPRESSED (3) 2009-12-10

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.