Reputation: 669
I'm using this code for unzipping zipped password protected files:
with zipfile.ZipFile(folder_name+'\\'+each+'\\'+latest, "r") as z:
z.extractall(folder_name+'\\'+each+'\\'+each,pwd=passwd)
This functionally works perfect, but is very slow. Is there any way to make unzipping fast?
Upvotes: 2
Views: 1576
Reputation: 906
From the Python zipfile docs:
It supports decryption of encrypted files in ZIP archives, but it currently cannot create an encrypted file. Decryption is extremely slow as it is implemented in native Python rather than C.
To speed up password protected unzipping - you should probably shell out to a separate utility.
Upvotes: 5