Text Files or binaries with objects?
- From: "peave" <me@xxxxx>
- Date: Mon, 6 Mar 2006 08:30:39 +0000 (UTC)
Hi.
I have some large text files that I need to repeatedly analyse. I can easily
parse the strings and load the data into my custom object ready to be
analysed, but the parsing has to take time, and I have a large number of
these text files to analyse.
Wouldn't it be more efficient, given that I will be re-analysing each text
file many times over many sessions, to parse the text files once, then save
my list of objects as a binary file, effectively avoiding the need to
repeatedly parse strings? I imagine it would, but I'm not sure how to do it.
At the moment I am using a TStringList to store the custom objects, but it
appears the SaveToFile method only saves the strings, not the objects
associated with them. If I use some SaveToStream cose, how do I decode the
stream when it come back?
The objects I use are really just records at the moment, with several
properties of type 'Single', and one 'TDateTime' property. I have used an
object type just in case I need to add methods etc that I haven't
anticipated.
thanks in advance for any hints or pointers.
Paul.
.
- Follow-Ups:
- Re: Text Files or binaries with objects?
- From: alanglloyd
- Re: Text Files or binaries with objects?
- From: Bruce Roberts
- Re: Text Files or binaries with objects?
- From: J French
- Re: Text Files or binaries with objects?
- Prev by Date: Re: Converting Base16 Hex to Binary
- Next by Date: Re: Why wont this work ?
- Previous by thread: delphi 7 & ADOquery
- Next by thread: Re: Text Files or binaries with objects?
- Index(es):
Relevant Pages
|