hOpenPGP-3.0.1.1: native Haskell implementation of OpenPGP (RFC9580)
Safe HaskellNone
LanguageHaskell2010

Codec.Encryption.OpenPGP.Compression

Synopsis

Documentation

data CompressionError Source #

Errors that can arise during decompression of an OpenPGP Compressed Data packet. Note that corrupt stream exceptions from the underlying zlib/bzip2 library are not captured here; they propagate as IOException through the call stack.

Constructors

EmptyCompressedPayload CompressionAlgorithm

The compressed payload bytes are empty; nothing to decompress.

InnerPacketParseFailed CompressionAlgorithm String

Decompression succeeded but the binary parse of the inner packet sequence failed.

ZeroLengthDecompressedPayload CompressionAlgorithm

Decompression and parse succeeded but produced no packets at all (zero-length uncompressed payload).

MarkerOnlyPayload CompressionAlgorithm

The decompressed content contains only Marker packets (RFC4880 §5.8 marker packets carry no semantic content).

decompressPkt :: Pkt -> Either CompressionError [Pkt] Source #

Decompress an OpenPGP Compressed Data packet, classifying structural failures as CompressionError. Non-Compressed-Data packets are returned unchanged in Right [p]. Corrupt compressed streams may still throw IOException from the underlying decompression library.