16#ifndef AEONGAMES_PACKAGE_H
17#define AEONGAMES_PACKAGE_H
25#include <unordered_map>
70 DLL
Package (
const std::string& aPath );
81 DLL
const std::filesystem::path&
GetPath()
const;
85 DLL
size_t GetFileSize (
const std::string& aFileName )
const;
89 DLL
const std::unordered_map<uint32_t, std::string>&
GetIndexTable()
const;
91 DLL
void LoadFile ( uint32_t crc,
void* buffer,
size_t buffer_size )
const;
93 DLL
void LoadFile (
const std::string& aFileName,
void* buffer,
size_t buffer_size )
const;
96 const std::filesystem::path mPath;
97 std::unordered_map<uint32_t, std::string> mIndexTable;
DLL const std::filesystem::path & GetPath() const
Get the path associated with this package.
DLL size_t GetFileSize(uint32_t crc) const
DLL void LoadFile(uint32_t crc, void *buffer, size_t buffer_size) const
DLL ~Package()
Destructor.
DLL const std::unordered_map< uint32_t, std::string > & GetIndexTable() const
Get the package index table.
DLL Package(const std::string &aPath)
Construct a Package from a file path.
<- This is here just for the literals
PKGCompressionTypes
Compression types supported by PKG packages.
Directory entry describing a single file within a PKG package.
uint64_t uncompressed_size
Original size of the file data before compression.
uint32_t path
Offset into the string table for the file path.
uint64_t compression_type
Compression algorithm used (see PKGCompressionTypes).
uint32_t offset
Byte offset of the file data within the package.
uint64_t compressed_size
Size of the file data after compression.
uint64_t extension_offset
Offset to the file extension in the string table.