Add a ZipFileLoader, which can let us load any single-file file type from a zip.

Useful for loading framedumps from github without manually having to
unzip each one, for example.
This commit is contained in:
Henrik Rydgård
2025-04-12 20:21:35 +02:00
parent 200edfaa96
commit fffbed53bc
19 changed files with 317 additions and 5 deletions
+9
View File
@@ -266,6 +266,15 @@ std::string_view KeepAfterLast(std::string_view s, char c) {
}
}
std::string_view KeepIncludingLast(std::string_view s, char c) {
size_t pos = s.rfind(c);
if (pos != std::string_view::npos) {
return s.substr(pos);
} else {
return s;
}
}
void SkipSpace(const char **ptr) {
while (**ptr && isspace(**ptr)) {
(*ptr)++;