in reply to How to get fast random access to a large file?

Depending on your application, you could use fixed length records. This format can be edited in a text editor (carefully) and it also provides random access:

some text # more lines # a very big # line split # into three #

another markup for overflowing lines:

some text # more lines # a very big \ line split \ into three #

Replies are listed 'Best First'.
Re^2: How to get fast random access to a large file?
by gothic_mallard (Pilgrim) on Oct 29, 2004 at 12:45 UTC

    Unfortuantly I don't have any control over the structure of the data file as it's autogenerated by software written by someone else and used by other systems.

    The content I can change (like, if it says to print "Mr J Bloggs", change it to "Mrs A Nonimouse") but I can't change the representation.

    --- Jay

    All code is untested unless otherwise stated.
    All opinions expressed are my own and are intended as guidance, not gospel; please treat what I say as such and as Abigail said Think for yourself.
    If in doubt ask.