Class: openpgp_packet_compressed

openpgp_packet_compressed

Implementation of the Compressed Data Packet (Tag 8) RFC4880 5.6: The Compressed Data packet contains compressed data. Typically, this packet is found as the contents of an encrypted packet, or following a Signature or One-Pass Signature packet, and contains a literal data packet.

new openpgp_packet_compressed()

Source:

Methods

<inner> compress(type, data) → {String}

Compress the packet data (member decompressedData)
Parameters:
Name Type Description
type Integer Algorithm to be used // See RFC 4880 9.3
data String Data to be compressed
Source:
Returns:
The compressed data stored in attribute compressedData
Type
String

<inner> decompress() → {String}

Decompression method for decompressing the compressed data read by read_packet
Source:
Returns:
The decompressed data
Type
String

<inner> read_packet(input, position, len) → {openpgp_packet_compressed}

Parsing function for the packet.
Parameters:
Name Type Description
input String Payload of a tag 8 packet
position Integer Position to start reading from the input string
len Integer Length of the packet or the remaining length of input at position
Source:
Returns:
Object representation
Type
openpgp_packet_compressed

<inner> toString() → {String}

Pretty printing the packet (useful for debug purposes)
Source:
Returns:
Type
String

<inner> write_packet(algorithm, data) → {String}

Creates a string representation of the packet
Parameters:
Name Type Description
algorithm Integer Algorithm to be used // See RFC 4880 9.3
data String Data to be compressed
Source:
Returns:
String-representation of the packet
Type
String