The only two requirements I'm limited to is that it must be OS independent and that the data is not saved as binary, I need to save it as text. I've heard of memory mapping, but I'm told I can only use it on windows. Currently, my program's speed is being mainly held back by how fast I can load a file, so any help would be appreciated. So far, this is the best solution I've come to.
std::ifstream file(filepath);
fileContents.assign(std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>());