unreal

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HeaderSize = 64

	SignatureOfs    = 0x00
	VersionOfs      = 0x04
	PkgFlagsOfs     = 0x08
	NameCountOfs    = 0x0c
	NameOffsetOfs   = 0x10
	ExportCountOfs  = 0x14
	ExportOffsetOfs = 0x18
	ImportCountOfs  = 0x1C
	ImportOffsetOfs = 0x20
	GUIDOfs         = 0x24
	GenerationsOfs  = 0x34
)

Functions

func GetExternalIndex

func GetExternalIndex(index int) int

Get an External Index from a given integer

func IntToByteArray

func IntToByteArray(num int64, length int) []byte

Transforms a int64 to a byte array given a delim

func IntToCompactIndex

func IntToCompactIndex(integer int) []byte

Read an int and returns a Compact Index as byte array

func ReadCompactIndex

func ReadCompactIndex(reader *bytes.Reader) (int, int)

Reads byte from a buffer and returns an uncompacted index as int Due the variable length of a CompactIndex, this function moves forward the pointer of the passed reader

func ReadName

func ReadName(reader *bytes.Reader) (uint8, string)

Reads byte from a buffer and returns a name string Due the variable length of a Name, this function moves forward the pointer of the passed reader

func ReadNextBytes

func ReadNextBytes(file *os.File, params ...int) []byte

Read the next bytes with additional delim and offset options Params: file *os.File, delim int, offset int

func SetExportCount

func SetExportCount(file *os.File, expCnt []byte) error

func SetExportOffset

func SetExportOffset(file *os.File, expOfs []byte) error

func SetGenerations

func SetGenerations(file *os.File, genCnt int, expCnt []byte, nameCnt []byte) error

func SetImportCount

func SetImportCount(file *os.File, impCnt []byte) error

func SetImportOffset

func SetImportOffset(file *os.File, impOfs []byte) error

func SetNameCount

func SetNameCount(file *os.File, nameCnt []byte) error

func SetNameOffset

func SetNameOffset(file *os.File, nameOfs []byte) error

Types

type Export

type Export struct {
	ClassIndex   int //Compactindex
	SuperIndex   int //Compactindex
	PackageIndex int32
	ObjectName   int //Compactindex
	ObjectFlags  uint32
	SerialSize   int //Compactindex
	SerialOffset int //Compactindex
}

func ExportTableParser

func ExportTableParser(count uint32, data []byte) ([]Export, error)
type Header struct {
	Signature       uint32
	PackageVersion  uint16
	LicenseeVersion uint16
	PackageFlags    uint32
	NameCount       uint32
	NameOffset      uint32
	ExportCount     uint32
	ExportOffset    uint32
	ImportCount     uint32
	ImportOffset    uint32
	GUID            dsp0134.UUID //DSP0134 standard
	GenerationCount uint32
	GenerationInfos struct {
		ExportCount uint32
		NameCount   uint32
	}
}

func PackageHeaderParser

func PackageHeaderParser(data []byte) (Header, error)

type Import

type Import struct {
	ClassPackage int //Compactindex
	ClassName    int //Compactindex
	PackageIndex int32
	ObjectName   int //Compactindex
}

func ImportTableParser

func ImportTableParser(count uint32, data []byte) ([]Import, error)

type Name

type Name struct {
	ObjectName struct {
		NameLength uint8
		NameString string
	}
	ObjectFlags uint32
}

func NameTableParser

func NameTableParser(count uint32, data []byte) ([]Name, error)

type PackageData

type PackageData struct {
	Header      Header
	NameTable   []Name
	ImportTable []Import
	ExportTable []Export
}

Jump to

Keyboard shortcuts

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