vpk

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: 0BSD Imports: 8 Imported by: 0

Documentation

Overview

Package vpk provides functionalities to manipulate VPK ("Valve PacK") format.

Reference: https://developer.valvesoftware.com/wiki/VPK_(file_format)

Index

Constants

View Source
const (
	Magic = 0x55AA1234
)

Variables

View Source
var (
	ErrNoSuchElement = fmt.Errorf("No such entry")
)

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Name  string
	Where string
	// contains filtered or unexported fields
}

func (Entry) LoadContents

func (entry Entry) LoadContents() ([]byte, error)

type ErrInvalidEntryTerminator

type ErrInvalidEntryTerminator struct {
	Bad uint16
}

func (ErrInvalidEntryTerminator) Error

type ErrInvalidMagic

type ErrInvalidMagic struct {
	Bad uint32
}

func (ErrInvalidMagic) Error

func (e ErrInvalidMagic) Error() string

type ErrUnsupportedVersion

type ErrUnsupportedVersion struct {
	Bad uint32
}

func (ErrUnsupportedVersion) Error

func (e ErrUnsupportedVersion) Error() string

type VPK

type VPK struct {
	Entries []Entry
	// contains filtered or unexported fields
}

func FromFile

func FromFile(name string) (VPK, error)

func (VPK) LoadEntry

func (pak VPK) LoadEntry(name string) ([]byte, error)

Source Files

  • reader.go
  • vpk.go

Jump to

Keyboard shortcuts

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