1 Billion row challenge is confusing

66 points martijn_t

Like the title states, I am confused about the code in the following article: https://curiouscoding.nl/posts/1brc/

More specifically I find the part where he introduces multithreading confusing. In order to parse a row of the file, you need the whole line. But as the lines are not all the same length, how can you divide the file in chunks without making sure you have the whole line. To me it seems like this code opens the possibility of cutting a line in half.

Maybe I am missing something, please let me know.