Zip File with PPMD Compression, Programmatically Unzip

橙三吉。 提交于 2019-12-24 09:18:10

问题


I have a Linux Python script that needs to unzip some zip files. I was using the zipfile module. On a few of these files I'm getting:

BadZipfile: Unsupported compression method 98 for file

Searching around it seems these files are using Method 98 PPMD compression. I figured if python couldn't do it, I'd make a hack system call to unzip 6.0 and be done with it. This errors:

skipping: fileName `PPMd' method not supported

I've tried 7zip:

Extracting  fileName     Unsupported Method

I thought I hit pay-dirt with a command line utility ppmd, but:

Fast PPMII compressor for textual data, variant I, Nov  6 2009
Segmentation fault

Anything else I can try? WinZip in windows has no problem with these files, but I need to do this in Linux.


回答1:


Have you taken a look at the p7zip (binary)?

It seems to support the PPMD compression format.

Some PPMd switches: -mmem=24b, -mmem=24k, -mmem=24m, -mo=2, and -mo=32



来源:https://stackoverflow.com/questions/1690993/zip-file-with-ppmd-compression-programmatically-unzip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!