in reply to Re^4: Out of Memory - Line of TXT too large
in thread Out of Memory - Line of TXT too large
Keep track of your integer position within the file as you read the file in large but arbitrarily-sized chunks. Look in each chunk to see if a newline character falls within it (look for the first byte of any two-byte sequence). If you find one, calculate the offset within the file where it falls, then seek to that. Rinse and repeat.