in reply to record separators

One way to do it would be to use a byte index into the file as part of your index rather than just assigning record numbers. That way, you could seek into the file, where you'd be at the beginning of a record, then process the record from there.