python - Extracting large files with zipfile -
i'm trying extract zip file of 1.23 gb zipfile
library. gives following error:
compression type 9 (deflate64)
here's code:
zip_ref = zipfile.zipfile(filepath, 'r') zip_ref.extractall(newpath)
it gives error while trying extract contents.
is there way unzip large zip files python?
this happens because compression method not implemented in zipfile
module.
some discussion issue here: https://bugs.python.org/issue14313
the fix raise notimplementederror
instead of adding support compression method.
suggested solutions:
- if possible, recompress file using standard deflate method.
- use
subprocess
module invoke systemunzip
command, asssuming installed on os (if supports compression method, i'm not sure. know 7-zip supports method.).
Comments
Post a Comment