vpk

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: 0BSD Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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)

Possible return errors:

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 {
	Name string

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

func FromFile

func FromFile(name string) (VPK, error)

Possible return errors:

func (VPK) LoadEntry

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

Possible return errors:

Source Files

  • reader.go
  • vpk.go

Jump to

Keyboard shortcuts

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