resource

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidType = errors.New("invalid type")
)

Functions

This section is empty.

Types

type RawResTypeChunk

type RawResTypeChunk struct {
	ID            byte
	Flags         byte
	Reserved      uint16
	EntryCount    uint32
	EntriesOffset uint32
	ConfigSize    uint32
}

func (*RawResTypeChunk) IsOffset16

func (r *RawResTypeChunk) IsOffset16() bool

func (*RawResTypeChunk) IsSparse

func (r *RawResTypeChunk) IsSparse() bool

type RawTypeEntry

type RawTypeEntry struct {
	Size  uint16
	Flags uint16
}

func (*RawTypeEntry) IsCompact

func (e *RawTypeEntry) IsCompact() bool

func (*RawTypeEntry) IsComplex

func (e *RawTypeEntry) IsComplex() bool

type ResChunkFlag

type ResChunkFlag byte
const (
	FlagSparse   ResChunkFlag = 0x01
	FlagOffset16 ResChunkFlag = 0x02
)

type ResTypeChunk

type ResTypeChunk struct {
	RawChunk RawResTypeChunk

	Entries []TypeEntryOffset
	// contains filtered or unexported fields
}

func NewResTypeChunk

func NewResTypeChunk(p internal.Parser, chunkEnd int64) (ResTypeChunk, error)

func (*ResTypeChunk) GetEntry

func (c *ResTypeChunk) GetEntry(p internal.Parser, index int, chunkEnd int64) (TypeEntry, error)

type ResTypeEntryFlag

type ResTypeEntryFlag uint16
const (
	FlagComplex ResTypeEntryFlag = 0x0001
	FlagCompact ResTypeEntryFlag = 0x0008
)

type StringPool

type StringPool struct {
	// contains filtered or unexported fields
}

func NewStringPool

func NewStringPool(p internal.Parser) (StringPool, error)

func (*StringPool) GetString

func (s *StringPool) GetString(p internal.Parser, index uint32) (string, error)

type Table

type Table struct {
	Strings       StringPool
	StringsByID   map[uint32]string
	StringsByName map[string]string
}

func NewTable

func NewTable(parser internal.Parser) (Table, error)

type TypeEntry

type TypeEntry struct {
	DataType int
	Data     uint32
	Key      int
	// contains filtered or unexported fields
}

type TypeEntryOffset

type TypeEntryOffset struct {
	ID     int
	Offset int32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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