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

This class represents the metadata that a file has inside a PackFile. More...

#include <Entry.h>

Collaboration diagram for vpkpp::Entry:

Public Attributes

uint32_t flags = 0
 Format-specific flags (PCK: File flags, VPK: Internal parser state, ZIP: Compression method / strength)
 
uint32_t archiveIndex = 0
 Which external archive this entry is in.
 
uint64_t length = 0
 Length in bytes (in formats with compression, this is the uncompressed length)
 
uint64_t compressedLength = 0
 If the format supports compression, this is the compressed length.
 
uint64_t offset = 0
 Offset, format-specific meaning - 0 if unused, or if the offset genuinely is 0.
 
std::vector< std::byte > extraData
 Format-specific (PCK: MD5 hash, VPK: Preloaded data)
 
uint32_t crc32 = 0
 CRC32 checksum - 0 if unused.
 
bool unbaked = false
 Used to check if entry is saved to disk.
 

Friends

class PackFile
 

Detailed Description

This class represents the metadata that a file has inside a PackFile.

It is used to access the file's data and read its properties

Definition at line 14 of file Entry.h.

Friends And Related Function Documentation

◆ PackFile

friend class PackFile
friend

Definition at line 15 of file Entry.h.

Member Data Documentation

◆ archiveIndex

uint32_t vpkpp::Entry::archiveIndex = 0

Which external archive this entry is in.

If this file format does not support external archives, this will always be 0

Definition at line 23 of file Entry.h.

◆ compressedLength

uint64_t vpkpp::Entry::compressedLength = 0

If the format supports compression, this is the compressed length.

If compression is not supported or unused, this will remain 0

Definition at line 30 of file Entry.h.

◆ crc32

uint32_t vpkpp::Entry::crc32 = 0

CRC32 checksum - 0 if unused.

Note that for GCF, this is actually an index into a checksum array and NOT a checksum

Definition at line 40 of file Entry.h.

◆ extraData

std::vector<std::byte> vpkpp::Entry::extraData

Format-specific (PCK: MD5 hash, VPK: Preloaded data)

Definition at line 36 of file Entry.h.

◆ flags

uint32_t vpkpp::Entry::flags = 0

Format-specific flags (PCK: File flags, VPK: Internal parser state, ZIP: Compression method / strength)

Definition at line 19 of file Entry.h.

◆ length

uint64_t vpkpp::Entry::length = 0

Length in bytes (in formats with compression, this is the uncompressed length)

Definition at line 26 of file Entry.h.

◆ offset

uint64_t vpkpp::Entry::offset = 0

Offset, format-specific meaning - 0 if unused, or if the offset genuinely is 0.

Definition at line 33 of file Entry.h.

◆ unbaked

bool vpkpp::Entry::unbaked = false

Used to check if entry is saved to disk.

Definition at line 43 of file Entry.h.


The documentation for this class was generated from the following file: