Is it worthwhile using IMAP COMPRESS (DEFLATE)?
问题 Gmail supports the IMAP COMPRESS Extension (RFC4978), specifically the DEFLATE algorithm (RFC1951) aka zlib/gzip. I'm not normally a Python programmer but I threw a quick test script together using Piers Lauder's imaplib2 to determine performance with or without compression enabled. from time import time import imaplib2, string def cb((response, cb_arg, error)): typ, data = response #print 'Message %s\n%s\n' % (cb_arg, data[0][5]) IMAP_SERVER='imap.gmail.com' IMAP_PORT=993 IMAP_USERNAME='****