I am using ZipFile in python to unzip a 6GB file. But it seems to be taking over 3hours to do so. I need to find a better alternative to fit within 20mins. Below is the code i have been working with which works perfectly fine but is very slow.
Python: 3.8.8
from zipfile import ZipFile
str_zipFile = 'C:\\Users\\Documents\\Test.zip'
str_pwd= '1234'
with ZipFile(str_zipFile) as zipObj:
zipObj.extractall(pwd = bytes(str_pwd,'utf-8'))
Please suggest a faster method.
Quote from Python zipfile module doc:
Decryption is extremely slow as it is implemented in native Python rather than C.
To get better performance, you can invoke an external program like unzip or 7z
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With