I am using following Python code to unzip the files
import zipfile
zfile = zipfile.ZipFile(input_file_path)
zfile.extractall(output_path)
However, when I try to unzip a larger file. It throws the following error.
NotImplementedError: compression type 98 (ppmd)
How should I fix this error?
Thank you.
Python's zipfile
module does not support PPMd compression--see issue 14366 (emphasis added):
I think we should add the ability to register new codecs. Support for PPMd, jpeg and WavPack is unlikely to emerge in the Python in the foreseeable future, but users of third-party libraries (such as PIL), will use the new codecs as needed.
There are only two options:
Use an external zip program from Python, and the subprocess
module. The p7zip
program would do the job nicely.
Modify Python to add PPMd support to the zipfile
module.
Keep in mind that PPMd is an extremely uncommon codec to use, so most programs (including regular unzip
) do not support it at all.