SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
Entry.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstddef>
4
#include <string>
5
#include <variant>
6
#include <vector>
7
8
#include <
sourcepp/Math.h
>
9
10
namespace
vpkpp
{
11
14
class
Entry {
15
friend
class
PackFile
;
16
17
public
:
19
uint32_t
flags
= 0;
20
23
uint32_t
archiveIndex
= 0;
24
26
uint64_t
length
= 0;
27
30
uint64_t
compressedLength
= 0;
31
33
uint64_t
offset
= 0;
34
36
std::vector<std::byte>
extraData
;
37
40
uint32_t
crc32
= 0;
41
43
bool
unbaked
=
false
;
44
45
private
:
47
std::variant<std::string, std::vector<std::byte>> unbakedData;
49
bool
unbakedUsingByteBuffer =
false
;
50
51
Entry() =
default
;
52
};
53
54
}
// namespace vpkpp
Math.h
vpkpp::Entry::unbaked
bool unbaked
Used to check if entry is saved to disk.
Definition
Entry.h:43
vpkpp::Entry::flags
uint32_t flags
Format-specific flags (PCK: File flags, VPK: Internal parser state, ZIP: Compression method / strengt...
Definition
Entry.h:19
vpkpp::Entry::offset
uint64_t offset
Offset, format-specific meaning - 0 if unused, or if the offset genuinely is 0.
Definition
Entry.h:33
vpkpp::Entry::compressedLength
uint64_t compressedLength
If the format supports compression, this is the compressed length.
Definition
Entry.h:30
vpkpp::Entry::archiveIndex
uint32_t archiveIndex
Which external archive this entry is in.
Definition
Entry.h:23
vpkpp::Entry::crc32
uint32_t crc32
CRC32 checksum - 0 if unused.
Definition
Entry.h:40
vpkpp::Entry::PackFile
friend class PackFile
Definition
Entry.h:15
vpkpp::Entry::length
uint64_t length
Length in bytes (in formats with compression, this is the uncompressed length).
Definition
Entry.h:26
vpkpp::Entry::extraData
std::vector< std::byte > extraData
Format-specific (PCK: MD5 hash, VPK: Preloaded data).
Definition
Entry.h:36
vpkpp
Definition
Attribute.h:5
include
vpkpp
Entry.h
Generated on
for SourcePP by
1.17.0