Documentation ¶
Index ¶
- Variables
- type Archive
- func (archive *Archive) BetTableCount() (bet_table_count uint32)
- func (archive *Archive) BetTableEntryIndex(index uint32, bet_table_entry *info.BetTableEntry) (err error)
- func (archive *Archive) BetTableFileFlagsCount() (file_flags_count uint32)
- func (archive *Archive) BetTableFileFlagsIndex(file_flags_index uint32) (file_flags info.FileFlag, err error)
- func (archive *Archive) BetTableHeader() (bet_table_header *info.BetTableHeader)
- func (archive *Archive) BetTableNameHash2Index(bet_table_index uint32) (name_hash_2 uint64, err error)
- func (archive *Archive) BlockTableCount() (count uint32)
- func (archive *Archive) BlockTableIndex(block_table_index uint32) (block_table_entry *info.BlockTableEntry, err error)
- func (archive *Archive) Close() error
- func (archive *Archive) ContainsHiBlockTable() bool
- func (archive *Archive) HashTableCount() (count uint32)
- func (archive *Archive) HashTableIndex(index uint32) (hash_entry *info.HashTableEntry, err error)
- func (archive *Archive) Header() (header *info.Header)
- func (archive *Archive) HetTableCount() (count uint32)
- func (archive *Archive) HetTableHeader() (header *info.HetTableHeader)
- func (archive *Archive) HetTableIndexBetTableIndex(het_table_index uint32) (bet_table_index uint32, err error)
- func (archive *Archive) HetTableNameHash1Index(het_table_index uint32) (name_hash_1 uint8, err error)
- func (archive *Archive) HiBlockTableIndex(block_table_index uint32) (hi_block_position uint16, err error)
- func (archive *Archive) List() (list List, err error)
- func (archive *Archive) Open(name string) (file *File, err error)
- func (archive *Archive) Position() (pos int64)
- type File
- type List
- type Set
Constants ¶
This section is empty.
Variables ¶
var (
ErrReadPatchFile = fmt.Errorf("mpq: patch files not yet implemented")
)
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct {
// contains filtered or unexported fields
}
An Archive provides access to a MoPaQ archive file
func (*Archive) BetTableCount ¶
The number of entries in the BET table
func (*Archive) BetTableEntryIndex ¶
func (archive *Archive) BetTableEntryIndex(index uint32, bet_table_entry *info.BetTableEntry) (err error)
Look up an entry in the BET table, copying its information into bet_table_entry
func (*Archive) BetTableFileFlagsCount ¶
The number of unique file flags values in the BET table
func (*Archive) BetTableFileFlagsIndex ¶
func (archive *Archive) BetTableFileFlagsIndex(file_flags_index uint32) (file_flags info.FileFlag, err error)
Return file flags for an file flags index
func (*Archive) BetTableHeader ¶
func (archive *Archive) BetTableHeader() (bet_table_header *info.BetTableHeader)
The header of the BET table
func (*Archive) BetTableNameHash2Index ¶
func (archive *Archive) BetTableNameHash2Index(bet_table_index uint32) (name_hash_2 uint64, err error)
Return the name hash 2 at the the BET table index
func (*Archive) BlockTableCount ¶
The number of entries in the block table
func (*Archive) BlockTableIndex ¶
func (archive *Archive) BlockTableIndex(block_table_index uint32) (block_table_entry *info.BlockTableEntry, err error)
Return the block table entry at an index
func (*Archive) ContainsHiBlockTable ¶
Return whether the Archive contains a hi-block table
A hi-block table contains high parts of block table offsets, allowing MPQ archives larger than 4GB
func (*Archive) HashTableCount ¶
The number of entries in the hash table
func (*Archive) HashTableIndex ¶
func (archive *Archive) HashTableIndex(index uint32) (hash_entry *info.HashTableEntry, err error)
Return the hash table entry at the index
func (*Archive) HetTableCount ¶
The number of entries in the HET table
func (*Archive) HetTableHeader ¶
func (archive *Archive) HetTableHeader() (header *info.HetTableHeader)
The header of the HET table
func (*Archive) HetTableIndexBetTableIndex ¶
func (archive *Archive) HetTableIndexBetTableIndex(het_table_index uint32) (bet_table_index uint32, err error)
Return the BET table index of a HET table entry index
func (*Archive) HetTableNameHash1Index ¶
func (archive *Archive) HetTableNameHash1Index(het_table_index uint32) (name_hash_1 uint8, err error)
Return the name hash 1 value at an index in the HET table
func (*Archive) HiBlockTableIndex ¶
func (archive *Archive) HiBlockTableIndex(block_table_index uint32) (hi_block_position uint16, err error)
Return the higher order bits of a block table index
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents a handle to a file contained within an Archive
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set contains a list of loaded MoPaQ [Archive]s
Source Files ¶
- archive.go
- archive_bet_table.go
- archive_block_table.go
- archive_close.go
- archive_ext_table_lookup.go
- archive_hash_lookup_name.go
- archive_hash_table.go
- archive_header.go
- archive_het_table.go
- archive_hi_block_table.go
- archive_list.go
- archive_open.go
- archive_open_ext.go
- archive_position.go
- archive_read_bet_table.go
- archive_read_block_table.go
- archive_read_hash_table.go
- archive_read_header.go
- archive_read_het_table.go
- archive_search_hash_table.go
- bet_table.go
- file.go
- file_close.go
- file_flag.go
- file_get_sector_count.go
- file_init.go
- file_read.go
- file_read_next_sector.go
- file_size.go
- glob_set.go
- het_table.go
- list.go
- open.go
- set.go
- set_add.go
- set_close.go
- set_list.go
- set_open.go
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package compress provides functions used for decompressing MPQ file sectors
|
Package compress provides functions used for decompressing MPQ file sectors |
Package crypto implements the Blizz hashing and encryption algorithms
|
Package crypto implements the Blizz hashing and encryption algorithms |
Package info defines binary structures and constants used by the MPQ format
|
Package info defines binary structures and constants used by the MPQ format |
Package jenkins provides the implementation of Bob Jenkins' `hashlittle2()` hash function used in MPQ
|
Package jenkins provides the implementation of Bob Jenkins' `hashlittle2()` hash function used in MPQ |