eagleflo / mpyq

Python library for reading MPQ archives.
BSD 2-Clause "Simplified" License
99 stars 23 forks source link

Support for more compression schemes #2

Open eagleflo opened 14 years ago

eagleflo commented 14 years ago

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 commented 12 years ago

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

eagleflo commented 10 years ago

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 commented 4 years ago

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.

TheSil commented 4 years ago

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

eagleflo commented 4 years ago

Hey there!

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

TheSil commented 4 years ago

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

eagleflo commented 4 years ago

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.