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§
- mpq_
block_ table_ entry - The Block Table Parsing
- mpq_
file_ header - Nom Parsing The MPQ File Header NOTES:
- mpq_
file_ header_ ext - Nom Parsing The MPQ File Header Extended NOTES:
- mpq_
hash_ table_ entry - The Hash Table Parsing
- mpq_
user_ data - Nom Parsing The MPQ User Data Section NOTES:
Enums§
- MPQHash
Type - Different HashTypes used in MPQ Archives, they are used to identify embedded filenames.
- MPQSection
Type - The type of sections that are available in an MPQ archive
Constants§
- LITTLE_
ENDIAN - The numeric values read are encoded in little endian LE
- MPQ_
ARCHIVE_ HEADER_ TYPE - Final byte of the magic to identify particularly the Archive Header.
- MPQ_
USER_ DATA_ HEADER_ TYPE - Final byte of the magic to identify particularly the User Data.
Statics§
Functions§
- get_
header_ type - Gets the header type from the MPQ file
- parse
- Parses the whole input into an MPQ
- peek_
hex - A helper function that shows only up to the first 8 bytes of an u8 slice in xxd format.
- read_
file - Convenience function to read a file to parse, mostly for testing.
- read_
headers - Reads the file headers, headers must contain the Archive File Header but they may optionally contain the User Data Headers.