1 #ifndef PACKER_UTIL_PACKER_H 2 #define PACKER_UTIL_PACKER_H 26 Packer(std::string filePath);
73 std::string
getFileType(
const std::string &extension);
77 #endif //PACKER_UTIL_PACKER_H std::vector< char > buffer
Definition: Packer.h:67
Namespace consisting of the packer utility.
Definition: CLIArg.h:11
Packer(std::string filePath)
Create a new packer.
Definition: Packer.cpp:4
bool fileExists(const std::string &filename)
Checks if file exists.
Definition: Packer.cpp:143
void deleteFileIfExists(const std::string &filename)
Deletes a file if it exists.
Definition: Packer.cpp:148
void WriteTable()
Writes a table of contents to the top of the file.
Definition: Packer.cpp:64
Takes care of packing files into a .dat file.
Definition: Packer.h:20
std::string getFileType(const std::string &extension)
Get a file's type based on file extension.
Definition: Packer.cpp:115
void ReadFileToBuffer(const std::filesystem::path filePath)
Read a new file into the buffer and write to the packed file.
Definition: Packer.cpp:9
std::vector< char > compressBuffer(const std::vector< char > &buffer)
Perform lossless compression on a buffer using zlib.
Definition: Packer.cpp:130
std::string outFilePath
Definition: Packer.h:66
std::map< std::string, std::string > fileLocMap
A map containing every file in the package and it's starting location.
Definition: Packer.h:42
std::vector< char > MapToVector()
Definition: Packer.cpp:105