pipe/stream gnupg output to tarfile in
问题 I have the following code but obviously this is not real streaming. It is the best I could find but it reads the whole input file into memory first. I want to stream it to tarfile module without using all my memory when decrypting huge (>100Gb files) import tarfile, gnupg gpg = gnupg.GPG(gnupghome='C:/Users/niels/.gnupg') with open('103330-013.tar.gpg', 'r') as input_file: decrypted_data = gpg.decrypt(input_file.read(), passphrase='aaa') # decrypted_data.data contains the data decrypted