How median-xl/pympq works
Pympq is a Windows-oriented Python binding for StormLib’s MPQ archive API. The main workflow is for a Python caller to create or open an archive, manage its contents, and open or extract files; file handles expose basic metadata and closing. The C++ extension translates Python calls and flag aliases into StormLib operations. The README documents additional archive and file capabilities, but the sampled implementation is incomplete, so those are represented at the archive-operation level rather than as detailed call chains.
Main entry points: mpq.h Archive handle · pympq.cpp Extension API · StormLib.h StormLib API · __init__.py Package export
Components 9
Python interface
- Package export
pympq/__init__.py
Native binding
- Extension API
src/pympq.cpp - Flag aliases
src/constant_alias.h
MPQ operations
- Archive handle
src/mpq.h - File handle
src/mpq_file.h - StormLib API
stormlib/x64/StormLib.h
Other components
- Python caller
- MPQ archive file
- Extracted file
Connections 13
- Python caller → Package export: imports
- Package export → Extension API: re-exports
- Python caller → Extension API: calls API
- Extension API → Flag aliases: translates flags
- Extension API → StormLib API: creates or opens
- Extension API → Archive handle: returns handle
- Archive handle → Flag aliases: translates flags
- Archive handle → StormLib API: manages archive
- Archive handle → MPQ archive file: reads or writes
- Archive handle → File handle: opens file handle
- Archive handle → Extracted file: extracts file
- File handle → StormLib API: queries or closes
- StormLib API → MPQ archive file: operates on