in reply to Parse a large string

You can always, if you choose, read “as much as you want” of the file, a “chunk,” into a buffer of some agreeable size. This naturally means that whatever is at the end of the buffer is probably incomplete, so, when you have divided-up the information that you've read in the agreed-upon way, set aside the last portion (presuming it to be incomplete). Then, when you read the next “chunk,” pre-pend that portion to what you have just read, and repeat the process.