mpq

package
v0.0.0-...-c9a6c25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package mpq reads data from Blizzard MPQ files.

Index

Constants

View Source
const (
	HashTableOffset = HashType(0)
	HashNameA       = HashType(1)
	HashNameB       = HashType(2)
	HashFileKey     = HashType(3)
)
View Source
const (
	BlockFlagFile           uint32 = 1 << 31
	BlockFlagCheckSums      uint32 = 1 << 26
	BlockFlagDeletionMarker uint32 = 1 << 25
	BlockFlagSingleUnit     uint32 = 1 << 24
	BlockFlagCompressed     uint32 = 1 << 9
	BlockFlagImploded       uint32 = 1 << 8
)

Variables

This section is empty.

Functions

func Hash

func Hash(in string, hashType HashType) uint32

Hash is the hash function used within MPQ files.

Types

type HashType

type HashType int

HashType identifies which variant of the hash function to use.

type Reader

type Reader struct {
	*os.File
	// contains filtered or unexported fields
}

Reader reads an MPQ file.

func NewReader

func NewReader(f *os.File) *Reader

NewReader reads the header of a file, returning an opened Reader.

func (*Reader) GetFileList

func (r *Reader) GetFileList() []string

GetFileList returns a list of the files contained in the MPQ according to its "(listfile") metafile, if present.

func (*Reader) OpenFile

func (r *Reader) OpenFile(name string) io.Reader

ReadFile reads a file from within the MPQ file.

Directories

Path Synopsis
mpqtool is a tool for dumping mpq files.
mpqtool is a tool for dumping mpq files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL