From 3fd4772700d7a648355efdae81e395b377463cfb Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 19 Dec 2013 21:16:05 -0800 Subject: [PATCH] Add PGPPacket._compression_algorithms From RFC 4880 [1]: ID Algorithm -- --------- 0 - Uncompressed 1 - ZIP [RFC1951] 2 - ZLIB [RFC1950] 3 - BZip2 [BZ2] 100 to 110 - Private/Experimental algorithm [1]: http://tools.ietf.org/search/rfc4880#section-9.3 --- gpg-migrate.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gpg-migrate.py b/gpg-migrate.py index 6f49ad7..401b696 100755 --- a/gpg-migrate.py +++ b/gpg-migrate.py @@ -99,6 +99,24 @@ class PGPPacket (dict): 110: 'private', } + _compression_algorithms = { + 0: 'uncompressed', + 1: 'zip', + 2: 'zlib', + 3: 'bzip2', + 100: 'private', + 101: 'private', + 102: 'private', + 103: 'private', + 104: 'private', + 105: 'private', + 106: 'private', + 107: 'private', + 108: 'private', + 109: 'private', + 110: 'private', + } + _clean_type_regex = _re.compile('\W+') def _clean_type(self): -- 2.26.2