I use the MS Visual Studio 2012 compiler, and I built it in x64 release mode.
Using ifstream, I can read files larger than 4 GB. The problem is that I cannot find a position in the middle of a 10 GB file.
When I use seekg like this is.seekg (5368709120, is.beg); , then is.tellg(); returns -1, which means the search did not work. I am sure that the file exists and the position 5368709120 exists. It works fine if I use: is.seekg (100, is.beg); eg.
Using multiple requests is not an option, as files can receive up to 300 GB (and using many requests will be slow).
My question is: how can I look for the correct work on a 10 GB file without using multiple queries?
source share