SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
vpkpp Namespace Reference

Classes

class  APK
struct  BakeOptions
class  Entry
 This class represents the metadata that a file has inside a PackFile. More...
struct  EntryOptions
class  EXAMPLE
class  FGP
class  FPX
class  GCF
class  GMA
class  HOG
class  OL
class  OO7
class  ORE
class  PackFile
class  PackFileReadOnly
class  PAK
class  PCK
class  VPK
class  VPK_VTMB
class  VPP
class  WAD3
 Valve GoldSrc WAD3 file. More...
class  XZP
class  ZIP

Enumerations

enum class  Attribute {
  NONE = 0 , ARCHIVE_INDEX = 1 << 0 , LENGTH = 1 << 1 , CRC32 = 1 << 2 ,
  PCK_MD5 = 1 << 3 , VPK_PRELOADED_DATA = 1 << 4
}
enum class  EntryCompressionType : int16_t {
  NO_OVERRIDE = -1 , NO_COMPRESS = 0 , DEFLATE = 8 , BZIP2 = 12 ,
  LZMA = 14 , ZSTD = 93 , XZ = 95
}

Variables

constexpr auto APK_SIGNATURE = sourcepp::parser::binary::makeFourCC("W#\0\0")
constexpr std::string_view APK_EXTENSION = ".apk"
constexpr auto FGP_SIGNATURE = sourcepp::parser::binary::makeFourCC("FGP\0")
constexpr std::string_view FGP_EXTENSION = ".grp"
constexpr std::string_view FGP_HASHED_FILEPATH_PREFIX = "__hashed__/"
constexpr auto FGP_SOURCEPP_FILENAMES_SIGNATURE = sourcepp::parser::binary::makeEightCC("PPECRUOS")
constexpr uint32_t FPX_SIGNATURE = 0x3241ff33
constexpr std::string_view FPX_DIR_SUFFIX = "_fdr"
constexpr std::string_view FPX_EXTENSION = ".fpx"
constexpr std::string_view GCF_EXTENSION = ".gcf"
constexpr auto GMA_SIGNATURE = sourcepp::parser::binary::makeFourCC("GMAD")
constexpr std::string_view GMA_EXTENSION = ".gma"
constexpr std::string_view HOG_SIGNATURE = "DHF"
constexpr std::string_view HOG_EXTENSION = ".hog"
constexpr std::string_view OL_SIGNATURE = "Worldcraft Prefab Library\x0d\x0a\x1a"
constexpr std::string_view OL_EXTENSION = ".ol"
constexpr std::string_view OO7_EXTENSION = ".007"
constexpr std::string_view ORE_EXTENSION = ".ore"
constexpr uint8_t PAK_FILENAME_MAX_SIZE = 56
constexpr auto PAK_SIGNATURE = sourcepp::parser::binary::makeFourCC("PACK")
constexpr uint8_t PAK_SIN_FILENAME_MAX_SIZE = 120
constexpr auto PAK_SIN_SIGNATURE = sourcepp::parser::binary::makeFourCC("SPAK")
constexpr uint8_t PAK_HROT_FILENAME_MAX_SIZE = 120
constexpr auto PAK_HROT_SIGNATURE = sourcepp::parser::binary::makeFourCC("HROT")
constexpr std::string_view PAK_EXTENSION = ".pak"
constexpr std::string_view SIN_EXTENSION = ".sin"
constexpr auto PCK_SIGNATURE = sourcepp::parser::binary::makeFourCC("GDPC")
constexpr std::string_view PCK_PATH_PREFIX = "res://"
constexpr std::string_view PCK_EXTENSION = ".pck"
constexpr uint32_t VPK_SIGNATURE = 0x55aa1234
constexpr uint16_t VPK_DIR_INDEX = 0x7fff
constexpr uint16_t VPK_ENTRY_TERM = 0xffff
constexpr std::string_view VPK_DIR_SUFFIX = "_dir"
constexpr std::string_view VPK_EXTENSION = ".vpk"
constexpr std::string_view VPK_KEYPAIR_PUBLIC_KEY_TEMPLATE = "public_key\n{\n\ttype \"rsa\"\n\trsa_public_key \"%s\"\n}\n"
constexpr std::string_view VPK_KEYPAIR_PRIVATE_KEY_TEMPLATE = "private_key\n{\n\ttype \"rsa\"\n\trsa_private_key \"%s\"\n\tprivate_key_encrypted 0\n\tpublic_key\n\t{\n\t\ttype \"rsa\"\n\t\trsa_public_key \"%s\"\n\t}\n}\n"
constexpr uint16_t VPK_MAX_PRELOAD_BYTES = 1024
 Maximum preload data size in bytes.
constexpr uint32_t VPK_DEFAULT_CHUNK_SIZE = 200 * 1024 * 1024
 Chunk size in bytes (default is 200mb)
constexpr std::string_view VPK_VTMB_EXTENSION = ".vpk"
constexpr uint32_t VPP_SIGNATURE_LIL = 0x51890ACE
constexpr uint32_t VPP_SIGNATURE_BIG = 0xCE0A8951
constexpr uint32_t VPP_ALIGNMENT = 2048
constexpr std::string_view VPP_EXTENSION = ".vpp"
constexpr std::string_view VPP_EXTENSION_PC = ".vpp_pc"
constexpr std::string_view VPP_EXTENSION_XBOX2 = ".vpp_xbox2"
constexpr int8_t WAD3_FILENAME_MAX_SIZE = 16
constexpr auto WAD3_SIGNATURE = sourcepp::parser::binary::makeFourCC("WAD3")
constexpr std::string_view WAD3_EXTENSION = ".wad"
constexpr auto XZP_HEADER_SIGNATURE = sourcepp::parser::binary::makeFourCC("piZx")
constexpr auto XZP_FOOTER_SIGNATURE = sourcepp::parser::binary::makeFourCC("tFzX")
constexpr std::string_view XZP_EXTENSION = ".xzp"
constexpr std::string_view BEE_EXTENSION = ".bee_pack"
constexpr std::string_view BMZ_EXTENSION = ".bmz"
constexpr std::string_view FPK_EXTENSION = ".fpk"
constexpr std::string_view PK3_EXTENSION = ".pk3"
constexpr std::string_view PK4_EXTENSION = ".pk4"
constexpr std::string_view PKZ_EXTENSION = ".pkz"
constexpr std::string_view ZIP_EXTENSION = ".zip"
constexpr std::string_view EXECUTABLE_EXTENSION0 = ".exe"
constexpr std::string_view EXECUTABLE_EXTENSION1 = ".bin"
constexpr std::string_view EXECUTABLE_EXTENSION2 = ".x86_64"
constexpr std::string_view EXAMPLE_EXTENSION = ".example"

Enumeration Type Documentation

◆ Attribute

enum class vpkpp::Attribute
strong
Enumerator
NONE 
ARCHIVE_INDEX 
LENGTH 
CRC32 
PCK_MD5 
VPK_PRELOADED_DATA 

Definition at line 7 of file Attribute.h.

◆ EntryCompressionType

enum class vpkpp::EntryCompressionType : int16_t
strong
Enumerator
NO_OVERRIDE 
NO_COMPRESS 
DEFLATE 
BZIP2 
LZMA 
ZSTD 
XZ 

Definition at line 7 of file Options.h.

Variable Documentation

◆ APK_EXTENSION

std::string_view vpkpp::APK_EXTENSION = ".apk"
constexpr

Definition at line 12 of file APK.h.

◆ APK_SIGNATURE

auto vpkpp::APK_SIGNATURE = sourcepp::parser::binary::makeFourCC("W#\0\0")
constexpr

Definition at line 11 of file APK.h.

◆ BEE_EXTENSION

std::string_view vpkpp::BEE_EXTENSION = ".bee_pack"
constexpr

Definition at line 9 of file ZIP.h.

◆ BMZ_EXTENSION

std::string_view vpkpp::BMZ_EXTENSION = ".bmz"
constexpr

Definition at line 10 of file ZIP.h.

◆ EXAMPLE_EXTENSION

std::string_view vpkpp::EXAMPLE_EXTENSION = ".example"
constexpr

Definition at line 20 of file ExamplePackFileImpl.h.

◆ EXECUTABLE_EXTENSION0

std::string_view vpkpp::EXECUTABLE_EXTENSION0 = ".exe"
constexpr

Definition at line 22 of file PackFile.h.

◆ EXECUTABLE_EXTENSION1

std::string_view vpkpp::EXECUTABLE_EXTENSION1 = ".bin"
constexpr

Definition at line 23 of file PackFile.h.

◆ EXECUTABLE_EXTENSION2

std::string_view vpkpp::EXECUTABLE_EXTENSION2 = ".x86_64"
constexpr

Definition at line 24 of file PackFile.h.

◆ FGP_EXTENSION

std::string_view vpkpp::FGP_EXTENSION = ".grp"
constexpr

Definition at line 12 of file FGP.h.

◆ FGP_HASHED_FILEPATH_PREFIX

std::string_view vpkpp::FGP_HASHED_FILEPATH_PREFIX = "__hashed__/"
constexpr

Definition at line 14 of file FGP.h.

◆ FGP_SIGNATURE

auto vpkpp::FGP_SIGNATURE = sourcepp::parser::binary::makeFourCC("FGP\0")
constexpr

Definition at line 11 of file FGP.h.

◆ FGP_SOURCEPP_FILENAMES_SIGNATURE

auto vpkpp::FGP_SOURCEPP_FILENAMES_SIGNATURE = sourcepp::parser::binary::makeEightCC("PPECRUOS")
constexpr

Definition at line 15 of file FGP.h.

◆ FPK_EXTENSION

std::string_view vpkpp::FPK_EXTENSION = ".fpk"
constexpr

Definition at line 11 of file ZIP.h.

◆ FPX_DIR_SUFFIX

std::string_view vpkpp::FPX_DIR_SUFFIX = "_fdr"
constexpr

Definition at line 10 of file FPX.h.

◆ FPX_EXTENSION

std::string_view vpkpp::FPX_EXTENSION = ".fpx"
constexpr

Definition at line 11 of file FPX.h.

◆ FPX_SIGNATURE

uint32_t vpkpp::FPX_SIGNATURE = 0x3241ff33
constexpr

Definition at line 9 of file FPX.h.

◆ GCF_EXTENSION

std::string_view vpkpp::GCF_EXTENSION = ".gcf"
constexpr

Definition at line 9 of file GCF.h.

◆ GMA_EXTENSION

std::string_view vpkpp::GMA_EXTENSION = ".gma"
constexpr

Definition at line 12 of file GMA.h.

◆ GMA_SIGNATURE

auto vpkpp::GMA_SIGNATURE = sourcepp::parser::binary::makeFourCC("GMAD")
constexpr

Definition at line 11 of file GMA.h.

◆ HOG_EXTENSION

std::string_view vpkpp::HOG_EXTENSION = ".hog"
constexpr

Definition at line 10 of file HOG.h.

◆ HOG_SIGNATURE

std::string_view vpkpp::HOG_SIGNATURE = "DHF"
constexpr

Definition at line 9 of file HOG.h.

◆ OL_EXTENSION

std::string_view vpkpp::OL_EXTENSION = ".ol"
constexpr

Definition at line 10 of file OL.h.

◆ OL_SIGNATURE

std::string_view vpkpp::OL_SIGNATURE = "Worldcraft Prefab Library\x0d\x0a\x1a"
constexpr

Definition at line 9 of file OL.h.

◆ OO7_EXTENSION

std::string_view vpkpp::OO7_EXTENSION = ".007"
constexpr

Definition at line 11 of file OO7.h.

◆ ORE_EXTENSION

std::string_view vpkpp::ORE_EXTENSION = ".ore"
constexpr

Definition at line 9 of file ORE.h.

◆ PAK_EXTENSION

std::string_view vpkpp::PAK_EXTENSION = ".pak"
constexpr

Definition at line 20 of file PAK.h.

◆ PAK_FILENAME_MAX_SIZE

uint8_t vpkpp::PAK_FILENAME_MAX_SIZE = 56
constexpr

Definition at line 11 of file PAK.h.

◆ PAK_HROT_FILENAME_MAX_SIZE

uint8_t vpkpp::PAK_HROT_FILENAME_MAX_SIZE = 120
constexpr

Definition at line 17 of file PAK.h.

◆ PAK_HROT_SIGNATURE

auto vpkpp::PAK_HROT_SIGNATURE = sourcepp::parser::binary::makeFourCC("HROT")
constexpr

Definition at line 18 of file PAK.h.

◆ PAK_SIGNATURE

auto vpkpp::PAK_SIGNATURE = sourcepp::parser::binary::makeFourCC("PACK")
constexpr

Definition at line 12 of file PAK.h.

◆ PAK_SIN_FILENAME_MAX_SIZE

uint8_t vpkpp::PAK_SIN_FILENAME_MAX_SIZE = 120
constexpr

Definition at line 14 of file PAK.h.

◆ PAK_SIN_SIGNATURE

auto vpkpp::PAK_SIN_SIGNATURE = sourcepp::parser::binary::makeFourCC("SPAK")
constexpr

Definition at line 15 of file PAK.h.

◆ PCK_EXTENSION

std::string_view vpkpp::PCK_EXTENSION = ".pck"
constexpr

Definition at line 13 of file PCK.h.

◆ PCK_PATH_PREFIX

std::string_view vpkpp::PCK_PATH_PREFIX = "res://"
constexpr

Definition at line 12 of file PCK.h.

◆ PCK_SIGNATURE

auto vpkpp::PCK_SIGNATURE = sourcepp::parser::binary::makeFourCC("GDPC")
constexpr

Definition at line 11 of file PCK.h.

◆ PK3_EXTENSION

std::string_view vpkpp::PK3_EXTENSION = ".pk3"
constexpr

Definition at line 12 of file ZIP.h.

◆ PK4_EXTENSION

std::string_view vpkpp::PK4_EXTENSION = ".pk4"
constexpr

Definition at line 13 of file ZIP.h.

◆ PKZ_EXTENSION

std::string_view vpkpp::PKZ_EXTENSION = ".pkz"
constexpr

Definition at line 14 of file ZIP.h.

◆ SIN_EXTENSION

std::string_view vpkpp::SIN_EXTENSION = ".sin"
constexpr

Definition at line 21 of file PAK.h.

◆ VPK_DEFAULT_CHUNK_SIZE

uint32_t vpkpp::VPK_DEFAULT_CHUNK_SIZE = 200 * 1024 * 1024
constexpr

Chunk size in bytes (default is 200mb)

Definition at line 24 of file VPK.h.

◆ VPK_DIR_INDEX

uint16_t vpkpp::VPK_DIR_INDEX = 0x7fff
constexpr

Definition at line 12 of file VPK.h.

◆ VPK_DIR_SUFFIX

std::string_view vpkpp::VPK_DIR_SUFFIX = "_dir"
constexpr

Definition at line 14 of file VPK.h.

◆ VPK_ENTRY_TERM

uint16_t vpkpp::VPK_ENTRY_TERM = 0xffff
constexpr

Definition at line 13 of file VPK.h.

◆ VPK_EXTENSION

std::string_view vpkpp::VPK_EXTENSION = ".vpk"
constexpr

Definition at line 15 of file VPK.h.

◆ VPK_KEYPAIR_PRIVATE_KEY_TEMPLATE

std::string_view vpkpp::VPK_KEYPAIR_PRIVATE_KEY_TEMPLATE = "private_key\n{\n\ttype \"rsa\"\n\trsa_private_key \"%s\"\n\tprivate_key_encrypted 0\n\tpublic_key\n\t{\n\t\ttype \"rsa\"\n\t\trsa_public_key \"%s\"\n\t}\n}\n"
constexpr

Definition at line 18 of file VPK.h.

◆ VPK_KEYPAIR_PUBLIC_KEY_TEMPLATE

std::string_view vpkpp::VPK_KEYPAIR_PUBLIC_KEY_TEMPLATE = "public_key\n{\n\ttype \"rsa\"\n\trsa_public_key \"%s\"\n}\n"
constexpr

Definition at line 17 of file VPK.h.

◆ VPK_MAX_PRELOAD_BYTES

uint16_t vpkpp::VPK_MAX_PRELOAD_BYTES = 1024
constexpr

Maximum preload data size in bytes.

Definition at line 21 of file VPK.h.

◆ VPK_SIGNATURE

uint32_t vpkpp::VPK_SIGNATURE = 0x55aa1234
constexpr

Definition at line 11 of file VPK.h.

◆ VPK_VTMB_EXTENSION

std::string_view vpkpp::VPK_VTMB_EXTENSION = ".vpk"
constexpr

Definition at line 9 of file VPK_VTMB.h.

◆ VPP_ALIGNMENT

uint32_t vpkpp::VPP_ALIGNMENT = 2048
constexpr

Definition at line 11 of file VPP.h.

◆ VPP_EXTENSION

std::string_view vpkpp::VPP_EXTENSION = ".vpp"
constexpr

Definition at line 12 of file VPP.h.

◆ VPP_EXTENSION_PC

std::string_view vpkpp::VPP_EXTENSION_PC = ".vpp_pc"
constexpr

Definition at line 13 of file VPP.h.

◆ VPP_EXTENSION_XBOX2

std::string_view vpkpp::VPP_EXTENSION_XBOX2 = ".vpp_xbox2"
constexpr

Definition at line 14 of file VPP.h.

◆ VPP_SIGNATURE_BIG

uint32_t vpkpp::VPP_SIGNATURE_BIG = 0xCE0A8951
constexpr

Definition at line 10 of file VPP.h.

◆ VPP_SIGNATURE_LIL

uint32_t vpkpp::VPP_SIGNATURE_LIL = 0x51890ACE
constexpr

Definition at line 9 of file VPP.h.

◆ WAD3_EXTENSION

std::string_view vpkpp::WAD3_EXTENSION = ".wad"
constexpr

Definition at line 13 of file WAD3.h.

◆ WAD3_FILENAME_MAX_SIZE

int8_t vpkpp::WAD3_FILENAME_MAX_SIZE = 16
constexpr

Definition at line 11 of file WAD3.h.

◆ WAD3_SIGNATURE

auto vpkpp::WAD3_SIGNATURE = sourcepp::parser::binary::makeFourCC("WAD3")
constexpr

Definition at line 12 of file WAD3.h.

◆ XZP_EXTENSION

std::string_view vpkpp::XZP_EXTENSION = ".xzp"
constexpr

Definition at line 13 of file XZP.h.

◆ XZP_FOOTER_SIGNATURE

auto vpkpp::XZP_FOOTER_SIGNATURE = sourcepp::parser::binary::makeFourCC("tFzX")
constexpr

Definition at line 12 of file XZP.h.

◆ XZP_HEADER_SIGNATURE

auto vpkpp::XZP_HEADER_SIGNATURE = sourcepp::parser::binary::makeFourCC("piZx")
constexpr

Definition at line 11 of file XZP.h.

◆ ZIP_EXTENSION

std::string_view vpkpp::ZIP_EXTENSION = ".zip"
constexpr

Definition at line 15 of file ZIP.h.