steam_vdf

package
v0.1.80 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsKnownBinaryType

func IsKnownBinaryType(b BinaryType) bool

func WriteBinary

func WriteBinary(p string, keyValues []*KeyValues) error

func WriteText

func WriteText(p string, keyValues []*KeyValues) error

Types

type BinaryType

type BinaryType byte
const (
	BinaryTypeNone BinaryType = iota
	BinaryTypeString
	BinaryTypeInt
	BinaryTypeFloat
	BinaryTypePtr
	BinaryTypeWString
	BinaryTypeColor
	BinaryTypeUint64
	BinaryTypeNullMarker
	BinaryTypeError BinaryType = 254
	BinaryTypeEOF   BinaryType = 255
)

https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/public/tier1/kvpacker.h

type KeyValues

type KeyValues struct {
	Key        string
	Value      *string
	Type       BinaryType
	TypedValue any
	Values     []*KeyValues
}

func GetKevValuesByKey

func GetKevValuesByKey(keyValues []*KeyValues, key string) *KeyValues

func ParseBinary

func ParseBinary(path string) ([]*KeyValues, error)

func ParseText

func ParseText(path string) ([]*KeyValues, error)

func (*KeyValues) WriteBinary

func (kv *KeyValues) WriteBinary(w io.Writer) error

func (*KeyValues) WriteString

func (kv *KeyValues) WriteString(w io.Writer, depth int) error

Jump to

Keyboard shortcuts

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