`boost::uintmax_t` sounds like overkill. This is the largest integer type supported on the architecture. This may be 128 bit on some systems. 
You shouldn't blindly switch to an unsigned type here. This will break things, see `if ( dataSize < 0 ) dataSize = 0;`  below.

`int64_t` would be possible, but `off_t` is the official type for this in C, and sizes according to the size of file offsets in the API (see https://stackoverflow.com/questions/1035657/seeking-and-reading-large-files-in-a-linux-c-application).