On Wed, 7 Jun 2006, Alexandre Leclerc wrote:
Well, I tought to improve the function by:
while not WeHaveGotALine
ReadBufferChunk
ParseForEol
- ReadMoreBufferIfRequired
- SetStreamPositionWhereWeFoundEolToContinueThereLater
You can't do that, because not all streams support positioning
(en-/decoding streams, compression streams, pipes)
So would that be usefull? Because any-way I must do it; loading a full
stream inmemory in not memory efficient, and loading it in a
TStringList has the same issue.
When loading in a stringlist you know that you must copy the whole
stream at once. With readln this is not possible: you don't know how
much you need in advance.
It's simply not possible at the TStream level.
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives