| 197 | } |
| 198 | |
| 199 | std::optional<size_t> ZipFile::getFileSize(const std::string& filename) const { |
| 200 | if (!_file || filename.empty()) return std::nullopt; |
| 201 | std::string searchName = getSearchName(filename); |
| 202 | auto it = _file->fileList.find(searchName); |
| 203 | if (it == _file->fileList.end()) return std::nullopt; |
| 204 | return s_cast<size_t>(it->second.size); |
| 205 | } |
| 206 | |
| 207 | uint8_t* ZipFile::getFileDataUnsafe(const std::string& filename, size_t* size) { |
| 208 | uint8_t* buffer = nullptr; |