mpyq icon indicating copy to clipboard operation
mpyq copied to clipboard

Support for more compression schemes

Open eagleflo opened this issue 15 years ago • 7 comments

So far the development of the library has been totally dominated by Starcraft II replay format, and each file inside SC2 replays is compressed by DEFLATE. I need to investigate other kinds of MPQs and support other compression schemes as I encounter them.

eagleflo avatar May 23 '10 02:05 eagleflo

I should add an option to ignore files with unsupported compression types for now.

eagleflo avatar Sep 26 '11 20:09 eagleflo

Looks like LZMA and sparse are relevant wrt. Starcraft II and later games. Python 3.3 added native support for LZMA with a very familiar interface.

eagleflo avatar Jan 05 '14 22:01 eagleflo

Diablo 2 uses PKWare Data Compression Library's Implode (https://support.pkware.com/display/PKZIP/DCL). https://github.com/madler/zlib/blob/master/contrib/blast/blast.c contains an open source C implementation.

eagleflo avatar Sep 15 '19 03:09 eagleflo

W3 maps also use PKWare compression, I've ported StormLib's implementation to Python to support that one in my fork, see: https://github.com/TheSil/mpyq/commit/a1fc59d489e797781a610f732a715a149f5ef953

TheSil avatar Mar 09 '20 23:03 TheSil

Hey there!

Thank you so much for doing this. I'd really like to upstream this. Could you make a pull request?

eagleflo avatar Mar 16 '20 11:03 eagleflo

Sure, although I am in a process of turning the compression into separate library (pypklib), will make the equest after that.

TheSil avatar Mar 21 '20 13:03 TheSil

That would be lovely. Earlier when looking at this I found some throw-away implementations of explode / implode around but nothing from PyPI; yours would be the first implementation that I can just depend on normally.

eagleflo avatar Mar 22 '20 09:03 eagleflo