pbo

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2014 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileEntry

type FileEntry struct {
	Name          string
	Flag          Flag
	UnpackedSize  uint32
	ReservedField uint32
	Timestamp     time.Time
	DataBlockSize uint32
	// contains filtered or unexported fields
}

func (FileEntry) EntrySize

func (f FileEntry) EntrySize() int

Gets the length of the entry block

func (FileEntry) IsNull

func (f FileEntry) IsNull() bool

func (FileEntry) Read

func (f FileEntry) Read(p []byte) (n int, err error)

Implement the io.Reader interface

func (*FileEntry) Seek

func (f *FileEntry) Seek(offset int64, whence int) (int64, error)

func (FileEntry) String

func (f FileEntry) String() string

type Flag

type Flag uint32
const (
	Uncompressed Flag = 0x00000000
	Packed       Flag = 0x43707273
	ProductEntry Flag = 0x56657273 // resistance/elite/arma
)

func (Flag) String

func (i Flag) String() string

type HeaderExtension

type HeaderExtension struct {
	FileEntry
	ExtendedFields map[string]string
}

func (HeaderExtension) EntrySize

func (f HeaderExtension) EntrySize() int

Gets the length of the entry block

func (*HeaderExtension) ReadExtendedFields

func (e *HeaderExtension) ReadExtendedFields(r *bufio.Reader)

type Pbo

type Pbo struct {
	HeaderExtension *HeaderExtension
	Entries         []FileEntry
	// contains filtered or unexported fields
}

func NewPbo

func NewPbo(path string) (*Pbo, error)

Reads the file given by path and returns a Pbo pointer and err != nil if no errors occurred

Jump to

Keyboard shortcuts

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