From: W. Trevor King Date: Fri, 20 Dec 2013 05:16:05 +0000 (-0800) Subject: Add PGPPacket._compression_algorithms X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3fd4772700d7a648355efdae81e395b377463cfb;p=gpg-migrate.git 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 --- 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):