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

Classes

struct  BakeOptions
 
class  Entry
 This class represents the metadata that a file has inside a PackFile. More...
 
struct  EntryOptions
 
class  EXAMPLE
 
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 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 int8_t PAK_FILENAME_MAX_SIZE = 56
 
constexpr auto PAK_SIGNATURE = sourcepp::parser::binary::makeFourCC("PACK")
 
constexpr int8_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 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

◆ BEE_EXTENSION

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

Definition at line 7 of file ZIP.h.

◆ BMZ_EXTENSION

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

Definition at line 8 of file ZIP.h.

◆ EXAMPLE_EXTENSION

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

Definition at line 20 of file ExamplePackFileImpl.h.

◆ EXECUTABLE_EXTENSION0

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

Definition at line 21 of file PackFile.h.

◆ EXECUTABLE_EXTENSION1

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

Definition at line 22 of file PackFile.h.

◆ EXECUTABLE_EXTENSION2

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

Definition at line 23 of file PackFile.h.

◆ FPK_EXTENSION

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

Definition at line 9 of file ZIP.h.

◆ FPX_DIR_SUFFIX

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

Definition at line 8 of file FPX.h.

◆ FPX_EXTENSION

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

Definition at line 9 of file FPX.h.

◆ FPX_SIGNATURE

constexpr uint32_t vpkpp::FPX_SIGNATURE = 0x3241ff33
constexpr

Definition at line 7 of file FPX.h.

◆ GCF_EXTENSION

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

Definition at line 7 of file GCF.h.

◆ GMA_EXTENSION

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

Definition at line 10 of file GMA.h.

◆ GMA_SIGNATURE

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

Definition at line 9 of file GMA.h.

◆ HOG_EXTENSION

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

Definition at line 8 of file HOG.h.

◆ HOG_SIGNATURE

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

Definition at line 7 of file HOG.h.

◆ OL_EXTENSION

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

Definition at line 10 of file OL.h.

◆ OL_SIGNATURE

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

Definition at line 9 of file OL.h.

◆ OO7_EXTENSION

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

Definition at line 9 of file OO7.h.

◆ ORE_EXTENSION

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

Definition at line 7 of file ORE.h.

◆ PAK_EXTENSION

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

Definition at line 15 of file PAK.h.

◆ PAK_FILENAME_MAX_SIZE

constexpr int8_t vpkpp::PAK_FILENAME_MAX_SIZE = 56
constexpr

Definition at line 9 of file PAK.h.

◆ PAK_HROT_FILENAME_MAX_SIZE

constexpr int8_t vpkpp::PAK_HROT_FILENAME_MAX_SIZE = 120
constexpr

Definition at line 12 of file PAK.h.

◆ PAK_HROT_SIGNATURE

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

Definition at line 13 of file PAK.h.

◆ PAK_SIGNATURE

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

Definition at line 10 of file PAK.h.

◆ PCK_EXTENSION

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

Definition at line 11 of file PCK.h.

◆ PCK_PATH_PREFIX

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

Definition at line 10 of file PCK.h.

◆ PCK_SIGNATURE

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

Definition at line 9 of file PCK.h.

◆ PK3_EXTENSION

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

Definition at line 10 of file ZIP.h.

◆ PK4_EXTENSION

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

Definition at line 11 of file ZIP.h.

◆ PKZ_EXTENSION

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

Definition at line 12 of file ZIP.h.

◆ VPK_DEFAULT_CHUNK_SIZE

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

Chunk size in bytes (default is 200mb)

Definition at line 22 of file VPK.h.

◆ VPK_DIR_INDEX

constexpr uint16_t vpkpp::VPK_DIR_INDEX = 0x7fff
constexpr

Definition at line 10 of file VPK.h.

◆ VPK_DIR_SUFFIX

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

Definition at line 12 of file VPK.h.

◆ VPK_ENTRY_TERM

constexpr uint16_t vpkpp::VPK_ENTRY_TERM = 0xffff
constexpr

Definition at line 11 of file VPK.h.

◆ VPK_EXTENSION

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

Definition at line 13 of file VPK.h.

◆ VPK_KEYPAIR_PRIVATE_KEY_TEMPLATE

constexpr 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 16 of file VPK.h.

◆ VPK_KEYPAIR_PUBLIC_KEY_TEMPLATE

constexpr 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 15 of file VPK.h.

◆ VPK_MAX_PRELOAD_BYTES

constexpr uint16_t vpkpp::VPK_MAX_PRELOAD_BYTES = 1024
constexpr

Maximum preload data size in bytes.

Definition at line 19 of file VPK.h.

◆ VPK_SIGNATURE

constexpr uint32_t vpkpp::VPK_SIGNATURE = 0x55aa1234
constexpr

Definition at line 9 of file VPK.h.

◆ VPK_VTMB_EXTENSION

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

Definition at line 7 of file VPK_VTMB.h.

◆ VPP_ALIGNMENT

constexpr uint32_t vpkpp::VPP_ALIGNMENT = 2048
constexpr

Definition at line 9 of file VPP.h.

◆ VPP_EXTENSION

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

Definition at line 10 of file VPP.h.

◆ VPP_EXTENSION_PC

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

Definition at line 11 of file VPP.h.

◆ VPP_EXTENSION_XBOX2

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

Definition at line 12 of file VPP.h.

◆ VPP_SIGNATURE_BIG

constexpr uint32_t vpkpp::VPP_SIGNATURE_BIG = 0xCE0A8951
constexpr

Definition at line 8 of file VPP.h.

◆ VPP_SIGNATURE_LIL

constexpr uint32_t vpkpp::VPP_SIGNATURE_LIL = 0x51890ACE
constexpr

Definition at line 7 of file VPP.h.

◆ WAD3_EXTENSION

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

Definition at line 11 of file WAD3.h.

◆ WAD3_FILENAME_MAX_SIZE

constexpr int8_t vpkpp::WAD3_FILENAME_MAX_SIZE = 16
constexpr

Definition at line 9 of file WAD3.h.

◆ WAD3_SIGNATURE

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

Definition at line 10 of file WAD3.h.

◆ XZP_EXTENSION

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

Definition at line 11 of file XZP.h.

◆ XZP_FOOTER_SIGNATURE

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

Definition at line 10 of file XZP.h.

◆ XZP_HEADER_SIGNATURE

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

Definition at line 9 of file XZP.h.

◆ ZIP_EXTENSION

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

Definition at line 13 of file ZIP.h.