What about :
core::string content;
content.reserve(size+1);
content[fread(content.c_str(), sizeof(char), size, **data)]='\0';