Expand description
Nom Parsing the MPQ file format
NOTES:
- All numbers in the MoPaQ format are in little endian byte order
- Signed numbers use the two’s complement system.
- Structure members are listed in the following general form:
- offset from the beginning of the structure: data type(array size) member name : member description
Re-exports§
pub use mpq_block_table_entry::MPQBlockTableEntry;
pub use mpq_file_header::MPQFileHeader;
pub use mpq_file_header_ext::MPQFileHeaderExt;
pub use mpq_hash_table_entry::MPQHashTableEntry;
pub use mpq_user_data::MPQUserData;
Modules§
- The Block Table Parsing
- Nom Parsing The MPQ File Header NOTES:
- Nom Parsing The MPQ File Header Extended NOTES:
- The Hash Table Parsing
- Nom Parsing The MPQ User Data Section NOTES:
Enums§
- Different HashTypes used in MPQ Archives, they are used to identify embedded filenames.
- The type of sections that are available in an MPQ archive
Constants§
- The numeric values read are encoded in little endian LE
- Final byte of the magic to identify particularly the Archive Header.
- Final byte of the magic to identify particularly the User Data.
Statics§
- The characters used as displayable by
peek_hex
Functions§
- Gets the header type from the MPQ file
- Parses the whole input into an MPQ
- A helper function that shows only up to the first 8 bytes of an u8 slice in xxd format.
- Convenience function to read a file to parse, mostly for testing.
- Reads the file headers, headers must contain the Archive File Header but they may optionally contain the User Data Headers.