I have ASCII files which are 100 to 400 MBs in size.
I’d like to read them byte-by-byte, as if I was reading an array. So I could access each byte like if (file[pos] == n)
etc.
However, I have thousands of these files and I presume it would be expensive to copy each one in to an array.
Is it possible to read the files like they were an array, without explicitly copying to an array, and avoiding mmap
/only use standard C++?