11 if (!std::filesystem::exists(path)) {
16 auto* hog =
new HOG{path};
17 auto packFile = std::unique_ptr<PackFile>(hog);
19 FileStream reader{hog->fullFilePath};
23 if (
const auto signature = reader.read_string(3); signature !=
HOG_SIGNATURE) {
33 const auto entryPath = hog->cleanEntryPath(reader.read_string(13));
41 entry.
length = reader.read<uint32_t>();
42 entry.
offset = reader.tell_in();
48 hog->entries.emplace(entryPath, entry);
51 callback(entryPath, entry);
This class represents the metadata that a file has inside a PackFile.
uint64_t offset
Offset, format-specific meaning - 0 if unused, or if the offset genuinely is 0.
uint64_t length
Length in bytes (in formats with compression, this is the uncompressed length)