40using FileMatchPair = std::function<std::pair<bool, std::string_view>(std::string_view)>;
46std::vector<uint8_t>
compress(
const std::string&
str);
51std::vector<uint8_t>
decompress(
const std::vector<uint8_t>&
dat);
57void compressGzip(
const std::vector<uint8_t>&
dat,
const std::string& path);
void compressGzip(const std::string &str, const std::string &path)
Compress string to a Gzip file.
std::vector< uint8_t > decompress(const std::vector< uint8_t > &str)
Decompress an STL string using zlib and return the original data.
std::vector< std::string > listFilesFromArchive(const std::string &path)
listFilesFromArchive list all files from an archive
void uncompressArchive(const std::string &archivePath, const std::string &dir, const FileMatchPair &f)
uncompressArchive Uncompresses an archive and puts the different files in dir folder according to a F...
std::function< std::pair< bool, std::string_view >(std::string_view)> FileMatchPair
gzFile openGzip(const std::string &path, const char *mode)
Open Gzip file (uses wide string version of gzopen on windows)
std::vector< uint8_t > readFileFromArchive(const std::string &archivePath, const std::string &fileRelativePathName)
readFileFromArchive read a file from an archive without uncompressing the whole archive
std::vector< uint8_t > decompressGzip(const std::string &path)
Decompress Gzip file to bytes.
std::vector< uint8_t > compress(const std::string &str)
Compress a STL string using zlib with given compression level and return the binary data.
void emitSignal(Args... args)
Simple macro to hide class' copy constructor and assignment operator.