Versions in this module Expand all Collapse all v0 v0.5.1 Jan 15, 2023 Changes in this version + const MD5_BETTable + const MD5_BlockTable + const MD5_HETTable + const MD5_HashTable + const MD5_HiBlockTable + const MD5_ListSize + const MD5_MPQHeader + const MPQChinese + const MPQCzech + const MPQDutch + const MPQEnglish + const MPQEnglishUK + const MPQFrench + const MPQGerman + const MPQItalian + const MPQJapanese + const MPQKorean + const MPQNeutral + const MPQPolish + const MPQPortuguese + const MPQRusssian + const MPQSpanish + const MPQ_HASH_FILE_KEY + const MPQ_HASH_KEY2_MIX + const MPQ_HASH_NAME_A + const MPQ_HASH_NAME_B + const MPQ_HASH_TABLE_INDEX + const MPQ_HEADER_DATA + const MPQ_USER_DATA + const SectorSize + const Size + var CompressionOrder = []CompressionType + var CompressionTable = map[CompressionType]*dcEntry + var Patterns = []string + func DecompressBlock(version int, fl CompressionType, content []byte) ([]byte, error) + func GetFiles(basepath string) ([]string, error) + type BlockEntry struct + CompressedSize uint32 + FileOffset uint64 + Flags BlockFlags + Size uint32 + func (m *BlockEntry) Match(flag BlockFlags) bool + type BlockFlags uint32 + const BlockCompress + const BlockDeleteMarker + const BlockEncrypted + const BlockExists + const BlockFixKey + const BlockPKZIP + const BlockPatchFile + const BlockSectorCRC + const BlockSingleUnit + func (bf BlockFlags) String() string + type CompressionType uint8 + const MPQ_COMPRESSION_ADPCM_MONO + const MPQ_COMPRESSION_ADPCM_STEREO + const MPQ_COMPRESSION_BZIP2 + const MPQ_COMPRESSION_HUFFMANN + const MPQ_COMPRESSION_PKWARE + const MPQ_COMPRESSION_SPARSE + const MPQ_COMPRESSION_ZLIB + func (c CompressionType) String() string + type Decompressor func([]byte) ([]byte, error) + type File struct + Block *BlockEntry + Hash *HashEntry + Multipart bool + Name string + Reader io.ReadSeeker + Volume *MPQ + func (f *File) Close() error + func (f *File) CompressedSize() int64 + func (f *File) GetBlockSize() int + func (f *File) GetFileOffset() int64 + func (f *File) IsCompressed() bool + func (f *File) ReadBlock() ([]byte, error) + type FileCorruptionError struct + CorruptionError error + Filename string + func (fce FileCorruptionError) Error() string + type FileWasDeletedError string + func (fwde FileWasDeletedError) Error() string + type HashEntry struct + BlockIndex uint32 + ID_A uint32 + ID_B uint32 + Locale uint16 + Platform uint16 + type Header struct + ArchiveOffset int64 + ArchiveSize uint32 + ArchiveSize64 uint64 + BETTableOffset64 uint64 + BETTableSize64 uint64 + BlockSize uint16 + BlockTableOffset uint32 + BlockTableOffsetHi uint16 + BlockTableSize uint32 + BlockTableSize64 uint64 + FormatVersion uint16 + HETTableOffset64 uint64 + HETTableSize64 uint64 + HashTableOffset uint32 + HashTableOffsetHi uint16 + HashTableSize uint32 + HashTableSize64 uint64 + HeaderSize uint32 + HiBlockTableOffset uint64 + HiBlockTableSize64 uint64 + MD5 [][]byte + RawChunkSize uint32 + Type uint32 + type MPQ struct + BlockTable []*BlockEntry + File io.ReadSeeker + GuardFile sync.Mutex + HashTable []*HashEntry + Header *Header + Path string + UserData *UserData + func Decode(i io.ReadSeeker) (*MPQ, error) + func Open(filename string) (*MPQ, error) + func (m *MPQ) BlockSize() int + func (m *MPQ) Close() error + func (m *MPQ) GetBlockTableOffset() int64 + func (m *MPQ) GetBlockTableSize() int + func (m *MPQ) GetHashTableOffset() int64 + func (m *MPQ) GetHashTableSize() int + func (m *MPQ) ListFiles() []string + func (m *MPQ) OpenFile(name string) (*File, error) + func (m *MPQ) Query(n string) (*HashEntry, error) + func (m *MPQ) ReadBlockTable() + func (m *MPQ) ReadHashTable() + func (m *MPQ) ReadHeaderData() error + func (m *MPQ) ReadUserData() + func (m *MPQ) Version() int + type Pool struct + func OpenPool(names []string) (*Pool, error) + func (p *Pool) ListFiles() []string + func (p *Pool) OpenFile(name string) (*File, error) + type UserData struct + HeaderOffset uint32 + HeaderSize uint32 + Size uint32