{ "info": { "author": "Aku Kotkavuo", "author_email": "aku.kotkavuo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Topic :: Games/Entertainment :: Real Time Strategy", "Topic :: Software Development :: Libraries", "Topic :: System :: Archiving" ], "description": "# mpyq\n\nmpyq is a Python library for reading MPQ (MoPaQ) archives used in many of\nBlizzard's games. It was originally developed for data mining Starcraft II\nreplay files.\n\nIn addition to being a library, mpyq also has a command line interface that\nexposes some of the library's core functionality such as extracting archives.\n\nAt this early stage in development only files compressed with DEFLATE or bzip2\nare uncompressed. This means that this library can not be used to extract most\nbig game asset archives that Blizzard's games use. More compression formats\nwill be supported in the future.\n\nAlso, as mpyq is so far pure Python code, it might be unfeasible to try to\nextract very large MPQ archives, even if all the compression methods used\ninside the archive were supported.\n\nNote that listing files inside an archive does not require full extraction.\nYou can safely take a peek inside any MPQ archive with this library.\n\n## Installation\n\nA stable version of mpyq is available from PyPI and can be installed with\neither `easy_install` or `pip`.\n\n $ easy_install mpyq\n $ pip install mpyq\n\nmpyq can be installed manually with the included setup.py script.\n\n $ python setup.py install\n\nRunning this command will install mpyq both as a library and a stand-alone\nscript that can be run from anywhere, provided that you have added Python's\nbin directory to your PATH environment variable.\n\nAlternative way to install mpyq is to clone this git repository somewhere on\nyour filesystem and then either adjust your PYTHONPATH environment variable to\npoint to the directory that contains the repository or create a symbolic link\nto your Python's site-packages directory pointing at the repository.\n\nNote that the command line interface part of mpyq uses the argparse module,\nwhich was included into Python's standard library in version 2.7. If you\ndidn't install mpyq from PyPI and you wish to use the command line interface\npart with Python 2.6, you should install argparse from PyPI manually.\n\n## Usage\n\n### As a library\n\n >>> from mpyq import MPQArchive\n >>> archive = MPQArchive('game.SC2Replay')\n\nNow you have a MPQArchive object of the file you opened. One common thing\nto do now is to extract the files from the archive.\n\n >>> files = archive.extract()\n\nThis will extract and return the archive's contents in memory. Be advised\nthat you might not want to do this with multi-gigabyte MPQ files from\nWorld of Warcraft, for example.\n\nFiles inside the archive can be also extracted and written to disk.\n\n >>> archive.extract_to_disk()\n\nIf you want to skip reading the (listfile) inside the archive, you can do\nso by passing `listfile=False` to the constructor.\n\n >>> archive = MPQArchive('bad_listfile.SC2Replay', listfile=False)\n\nThis might be required if the (listfile) is encrypted or has been tampered\nwith. Note that you can't list files or extract the whole archive if you do\nthis -- you need to know in advance which files you want to read.\n\n >>> archive.read('replay.details')\n '\\x05\\x1c\\x00\\x04\\x01\\x00\\x04\\x05...'\n\nFor more information, consult `help(mpyq)` in your Python console.\n\n### From the command line\n\n usage: mpyq.py [-h] [-I] [-H] [-b] [-s] [-t] [-x] file\n\n mpyq reads and extracts MPQ archives.\n\n positional arguments:\n file path to the archive\n\n optional arguments:\n -h, --help show this help message and exit\n -I, --headers print header information from the archive\n -H, --hash-table print hash table\n -b, --block-table print block table\n -s, --skip-listfile skip reading (listfile)\n -t, --list-files list files inside the archive\n -x, --extract extract files from the archive\n\nYou can extract all the files inside the archive with `-x/--extract`.\n\n $ mpyq -x game.SC2Replay\n\nThis will create a directory called 'game' with the files inside.\n\nYou can print the header information from a given archive with `-I/--headers`.\n\n $ mpyq -I game.SC2Replay\n MPQ archive header\n ------------------\n magic 'MPQ\\x1a'\n header_size 44\n arhive_size 19801\n format_version 1\n sector_size_shift 3\n hash_table_offset 19385\n block_table_offset 19641\n hash_table_entries 16\n block_table_entries 10\n extended_block_table_offset 0\n hash_table_offset_high 0\n block_table_offset_high 0\n offset 1024\n\n MPQ user data header\n --------------------\n magic 'MPQ\\x1b'\n user_data_size 512\n mpq_header_offset 1024\n user_data_header_size 60\n content '\\x05\\x08\\x00\\x02,StarCraft II replay\\x1b\n 11\\x02\\x05\\x0c\\x00\\t\\x02\\x02\\t\\x00\\x04\\t\n (\\x06\\t\\x00\\x08\\t\\xc8\\xfa\\x01\\n\\t\\xc8\\xf\n a\\x01\\x04\\t\\x04\\x06\\t\\xa2\\x99\\x01'\n\nYou can display the archive's hash table with `-H/--hash-table`.\n\n $ mpyq -H game.SC2Replay\n MPQ archive hash table\n ----------------------\n Hash A Hash B Locl Plat BlockIdx\n D38437CB 07DFEAEC 0000 0000 00000009\n AAC2A54B F4762B95 0000 0000 00000002\n FFFFFFFF FFFFFFFF FFFF FFFF FFFFFFFF\n FFFFFFFF FFFFFFFF FFFF FFFF FFFFFFFF\n FFFFFFFF FFFFFFFF FFFF FFFF FFFFFFFF\n C9E5B770 3B18F6B6 0000 0000 00000005\n 343C087B 278E3682 0000 0000 00000004\n 3B2B1EA0 B72EF057 0000 0000 00000006\n 5A7E8BDC FF253F5C 0000 0000 00000001\n FD657910 4E9B98A7 0000 0000 00000008\n D383C29C EF402E92 0000 0000 00000000\n FFFFFFFF FFFFFFFF FFFF FFFF FFFFFFFF\n FFFFFFFF FFFFFFFF FFFF FFFF FFFFFFFF\n FFFFFFFF FFFFFFFF FFFF FFFF FFFFFFFF\n 1DA8B0CF A2CEFF28 0000 0000 00000007\n 31952289 6A5FFAA3 0000 0000 00000003\n\nYou can display the archive's block table with `-b/--block-table`.\n\n $ mpyq -b game.SC2Replay\n MPQ archive block table\n -----------------------\n Offset ArchSize RealSize Flags\n 0000002C 443 443 81000200\n 000001E7 609 1082 81000200\n 00000448 16077 42859 81000200\n 00004315 94 94 81000200\n 00004373 96 96 81000200\n 000043D3 591 765 81000200\n 00004622 802 1444 81000200\n 00004944 247 580 81000200\n 00004A3B 120 164 81000200\n 00004AB3 262 288 81000200\n\nYou can list all files inside the archive with `-t/--list-files`.\n\n $ mpyq -t game.SC2Replay\n replay.attributes.events 580 bytes\n replay.details 443 bytes\n replay.game.events 42859 bytes\n replay.initData 1082 bytes\n replay.load.info 96 bytes\n replay.message.events 94 bytes\n replay.smartcam.events 1444 bytes\n replay.sync.events 765 bytes\n\nYou can skip reading the listfile with `-s/--skip-listfile`. This might be\nnecessary if the listfile is encrypted or corrupted. Note that you cannot\nlist files or extract the whole archive without the listfile.\n\n## References\n\nThe following two documents were used as references for the MPQ format:\n\n * [http://www.zezula.net/en/mpq/mpqformat.html](http://www.zezula.net/en/mpq/mpqformat.html)\n * [http://wiki.devklog.net/index.php?title=The_MoPaQ_Archive_Format](http://wiki.devklog.net/index.php?title=The_MoPaQ_Archive_Format)\n\n\n## Copyright\n\nCopyright 2010-2014 Aku Kotkavuo. See LICENSE for details.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/arkx/mpyq/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "mpyq", "package_url": "https://pypi.org/project/mpyq/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mpyq/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/arkx/mpyq/" }, "release_url": "https://pypi.org/project/mpyq/0.2.5/", "requires_dist": null, "requires_python": null, "summary": "A Python library for extracting MPQ (MoPaQ) files.", "version": "0.2.5" }, "last_serial": 1031819, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f08a1e38528fdb6c29e47036e3302d29", "sha256": "7cde0a3c776c1b59ef30547c55dd89a94790f06876f39dde3c6563927f7970c6" }, "downloads": -1, "filename": "mpyq-0.1.tar.gz", "has_sig": false, "md5_digest": "f08a1e38528fdb6c29e47036e3302d29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6389, "upload_time": "2010-09-06T00:42:18", "url": "https://files.pythonhosted.org/packages/55/54/7fb615a699a3e5e6fecfa28718d55da54081902d4b8eb96c0288f4c410e4/mpyq-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "317fb7dd73c31c9443d37c41ada6ef01", "sha256": "9396bde5076e98ebc2714d6ead3f87a6abfda8b149b9317796d1e154c996b791" }, "downloads": -1, "filename": "mpyq-0.1.1.tar.gz", "has_sig": false, "md5_digest": "317fb7dd73c31c9443d37c41ada6ef01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7155, "upload_time": "2011-01-05T15:55:01", "url": "https://files.pythonhosted.org/packages/ba/33/9cae0643619cdff4bc4b13f8479796c4e149b672424f166955a324548cb1/mpyq-0.1.1.tar.gz" } ], "0.1.10": [ { "comment_text": "", "digests": { "md5": "db33a2068fb3f6307b4f8e2a0ee5b6fb", "sha256": "e951698aad9f816b997c385132d846a073ce9913f50aa0463fa45612651910e6" }, "downloads": -1, "filename": "mpyq-0.1.10.tar.gz", "has_sig": false, "md5_digest": "db33a2068fb3f6307b4f8e2a0ee5b6fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8433, "upload_time": "2011-09-19T23:58:50", "url": "https://files.pythonhosted.org/packages/69/81/71a24d21418126b56682b00248a73a0c1f83cc15cdd47c8bcf4b07f4f1da/mpyq-0.1.10.tar.gz" } ], "0.1.11": [ { "comment_text": "", "digests": { "md5": "c54a9fe1886aec8a6b919613a95c11b7", "sha256": "7eeed1d822677e681b184ade9b68b0b6d44b4f019e3939fc91a3c290c5ba52ca" }, "downloads": -1, "filename": "mpyq-0.1.11.tar.gz", "has_sig": false, "md5_digest": "c54a9fe1886aec8a6b919613a95c11b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8483, "upload_time": "2011-09-20T00:29:39", "url": "https://files.pythonhosted.org/packages/37/45/2dc0abb88d513cb685d0377b110bb70eabf1e1cd1c6d1ac813b26dac6783/mpyq-0.1.11.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "36df0a4bd0dffbb5ade643908ee009a0", "sha256": "1963ce14c5d37c8486ac99cb86ce96cf32ddc9822c4b2eafbdf786eeec7c3838" }, "downloads": -1, "filename": "mpyq-0.1.2.tar.gz", "has_sig": false, "md5_digest": "36df0a4bd0dffbb5ade643908ee009a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7164, "upload_time": "2011-02-24T19:43:58", "url": "https://files.pythonhosted.org/packages/f4/0d/10380d022f0855d4591fb4fb1b356d500be4f85bd317cf40a6372f7d0f95/mpyq-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "60dc4f0ce9abca999aff3bf506385d2a", "sha256": "b127983e9c1c93ceba64dd6d950c40e9a3c3c9ab866ee58fdfd7f9da772d0326" }, "downloads": -1, "filename": "mpyq-0.1.3.tar.gz", "has_sig": false, "md5_digest": "60dc4f0ce9abca999aff3bf506385d2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7353, "upload_time": "2011-02-26T19:11:52", "url": "https://files.pythonhosted.org/packages/78/85/d0c9edaab8ab238aa94c31d30b59e429fb8defa15a1821819e7994d57442/mpyq-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "27ebf5ce406d35db79bf46cd9e0a9f83", "sha256": "e1218e4f99d8096c9960a055175379c3c2754a0eb8b660067e87f2d8ea866753" }, "downloads": -1, "filename": "mpyq-0.1.4.tar.gz", "has_sig": false, "md5_digest": "27ebf5ce406d35db79bf46cd9e0a9f83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7778, "upload_time": "2011-02-27T23:53:26", "url": "https://files.pythonhosted.org/packages/e4/75/5c34f79e89e6c79401170d345904ce1237e816156a991ecb9a2e289ed5bc/mpyq-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "f6f1b2b5a6474aeac669785d79b05c07", "sha256": "d79fb68f7c2f32321aa2be9db7f2298e3ad203bd1331fa0755ab21d3f5729840" }, "downloads": -1, "filename": "mpyq-0.1.5.tar.gz", "has_sig": false, "md5_digest": "f6f1b2b5a6474aeac669785d79b05c07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8202, "upload_time": "2011-03-01T13:46:40", "url": "https://files.pythonhosted.org/packages/a3/48/243372da32c7c7e482c95017c1d9cba40f9946ee240ec015e61dbbe8f345/mpyq-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "87ecf3643f94b370f89743f530c066d3", "sha256": "421a1c475f18d71cbe740eebd2cf0142dd6b916e68f14a6e5d9299ac04fdca0f" }, "downloads": -1, "filename": "mpyq-0.1.6.tar.gz", "has_sig": false, "md5_digest": "87ecf3643f94b370f89743f530c066d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8239, "upload_time": "2011-03-03T08:44:27", "url": "https://files.pythonhosted.org/packages/3e/d2/33bca2f44d1ea46d7f393fb78eda64f868f180d7d1e3aba0435a83bd3157/mpyq-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "25ef10e1f4824afbee928d716bfcddd1", "sha256": "c4c35aff552cfca09f4756995b2baa561d75fbd4b7fb2bdd83ddaeb4f812f681" }, "downloads": -1, "filename": "mpyq-0.1.7.tar.gz", "has_sig": false, "md5_digest": "25ef10e1f4824afbee928d716bfcddd1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8267, "upload_time": "2011-03-08T21:09:15", "url": "https://files.pythonhosted.org/packages/a9/8f/7004bb9646290cd2dad61c11c842a61de99ddecda3ec08d3f7d4ebdf5b0b/mpyq-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "395381f15ab04e8acc32faa90598af68", "sha256": "9e13bc075767c64a04f0bf87be82fac630be0d8c7765fd435489a1737cd1ff5e" }, "downloads": -1, "filename": "mpyq-0.1.8.tar.gz", "has_sig": false, "md5_digest": "395381f15ab04e8acc32faa90598af68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8286, "upload_time": "2011-03-28T19:49:49", "url": "https://files.pythonhosted.org/packages/55/86/5ec89ac36965faece50b0eb86bc482d74b36bbad0c768e727d11679ea6a3/mpyq-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "cb699dac93affc46182bce4e26dc3852", "sha256": "a9cc7903511ddfe7ab6c7d2889dc6a72e5b0134d132d5aece2ce6e322d0c5b92" }, "downloads": -1, "filename": "mpyq-0.1.9.tar.gz", "has_sig": false, "md5_digest": "cb699dac93affc46182bce4e26dc3852", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8354, "upload_time": "2011-09-19T01:24:05", "url": "https://files.pythonhosted.org/packages/53/1a/2e836767c0b1dee18a8dbf037887a06249925ee045660ded7130a2eabea0/mpyq-0.1.9.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4aaaa4aae9c135c8c988740b31fd79c4", "sha256": "8598b63bfaeaffc7a1fbc7a1d4fdc22bb4c010d61b4b389868565f2c1f2c20b9" }, "downloads": -1, "filename": "mpyq-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4aaaa4aae9c135c8c988740b31fd79c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8504, "upload_time": "2011-09-27T00:03:52", "url": "https://files.pythonhosted.org/packages/dc/6a/3c5e605c73d3b6d94f0ed3dc95a8a302daf0271cb11638f43a46e878ae77/mpyq-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "8a09d01c1974c87cd15db9250ec17e82", "sha256": "57b31c75b9327611c5f01892ab6a2235b8f30fc64a1f751e3afef83aeb627752" }, "downloads": -1, "filename": "mpyq-0.2.1.tar.gz", "has_sig": false, "md5_digest": "8a09d01c1974c87cd15db9250ec17e82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8527, "upload_time": "2013-02-26T21:54:24", "url": "https://files.pythonhosted.org/packages/19/a9/e877b38980775e2e9336b8905b5d6eafb4ffa975296f6d3b6f4775931079/mpyq-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "0f78c1f59bfa6c56cbcede0562fa6907", "sha256": "bc01ebb09c6020a1bab24b3ffcbca861b166efaf469857718f1ed1a42259c26a" }, "downloads": -1, "filename": "mpyq-0.2.2.tar.gz", "has_sig": false, "md5_digest": "0f78c1f59bfa6c56cbcede0562fa6907", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8587, "upload_time": "2013-04-08T21:08:51", "url": "https://files.pythonhosted.org/packages/3b/42/8c7a6d9206f759675724e0329971f8e169f09973455cdfaebfdfc0ec98bf/mpyq-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "b703b924b2fdba7b8057912108d6e2af", "sha256": "549e171b461245249f25188239d50b49f63a3cb3abe216b8c72a12675bc9ad26" }, "downloads": -1, "filename": "mpyq-0.2.3.tar.gz", "has_sig": false, "md5_digest": "b703b924b2fdba7b8057912108d6e2af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8602, "upload_time": "2013-07-31T13:31:38", "url": "https://files.pythonhosted.org/packages/66/e8/392ab2c18393f22fb703f6faea164d8d33e1f447aeb435403c45c65dafae/mpyq-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "3f0f7be17e6082c66e4d24fc73e220b2", "sha256": "e585339449ecfb68f199c7d014850ce70ab89c5931392ecf25ed1c5c96361863" }, "downloads": -1, "filename": "mpyq-0.2.4.tar.gz", "has_sig": false, "md5_digest": "3f0f7be17e6082c66e4d24fc73e220b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8646, "upload_time": "2014-01-05T20:12:38", "url": "https://files.pythonhosted.org/packages/eb/f9/8a7de0bf369e62986418bf76408bc19b8d51cd7e1d3284cf14da52ec725f/mpyq-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "343db938a06ec178b0683c98469679f7", "sha256": "30aaf5962be569f3f2b53978060cd047434ee4f5a215925dd6ff0fef04ec0007" }, "downloads": -1, "filename": "mpyq-0.2.5.tar.gz", "has_sig": false, "md5_digest": "343db938a06ec178b0683c98469679f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8677, "upload_time": "2014-03-17T02:25:41", "url": "https://files.pythonhosted.org/packages/ff/10/76041d97aa01e4d0f93481942b4faf5652123acdd90fbff4e40bb8d9024c/mpyq-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "343db938a06ec178b0683c98469679f7", "sha256": "30aaf5962be569f3f2b53978060cd047434ee4f5a215925dd6ff0fef04ec0007" }, "downloads": -1, "filename": "mpyq-0.2.5.tar.gz", "has_sig": false, "md5_digest": "343db938a06ec178b0683c98469679f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8677, "upload_time": "2014-03-17T02:25:41", "url": "https://files.pythonhosted.org/packages/ff/10/76041d97aa01e4d0f93481942b4faf5652123acdd90fbff4e40bb8d9024c/mpyq-0.2.5.tar.gz" } ] }