Dear all.
I need to read big text file and store the starting position and length of blocks that are present in this file. I have text file with a tag that identifies the beginning of a text block (this tag in the example is "- start -") and a tag that identifies where my block finish (i.e. "- stop -"). I don't know how long these text blocks are, they could be also of one single line, and I don't know how many of these blocks there are in a single file, could be one or thousands. I would like to read my file one time and then store the start position and the length of every block in order to access rapidly and directly to each block. Once stored start and length I would like to read each block directly and store the text lines to a TStringList. These files could be huge ( 1 Gb) so I would like to read one time and then access directly to a defined block.

i.e.
my file are like this

- start -
first block of a lot of characters and a lot of lines
- stop -
- start -
second block of a lot of characters and a lot of lines
- stop -
...
- start -
n-th block of a lot of characters and a lot of lines
- stop -


Any suggestion?
andrea

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to