[Info-vax] Anyone interested in another public access system
JF Mezei
jfmezei.spamnot at vaxination.ca
Sat Apr 11 13:19:32 EDT 2009
Richard B. Gilbert wrote:
> read files only with great difficulty. You would have to port a big
> chunk of RMS to read files and make sense of them.
Once you have a list of blocks that make up a file (and the EOF
displacement into the last block), processing a variable length text
file would not be very difficult. 2 byte displacement indicating rcord
length, followed by that many bytes.
Reading through an indexed file is a bit more complex but the structure
of indexed files is fairly well documented (and there is always Hein to
help !!!). Compressed records/index does add a bit of complexity to the
code.
It is the reading of all the ODS structures which is more involved since
this is also where you find the file attributes which tell you how to
read a file.
And when you think about it, an indexed RMS file is just as much a
stream of bytes as a proprietary Microsoft Word document is. Without
knowledge of its structure, all you can do is read a stream of random
bytes until you reach EOF.
Consider how Unix/Widnows applications rely on reading whole text files
into memory instead of using proper indexing into files. Applications
just as itunes and iphoto come to mind where they really should be using
some form of indexed file to deal with large number of records instead
of having a flat text file to store all record which needs to be
rewritten completely whenever you make changes.
More information about the Info-vax
mailing list