Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Code or utilities for managing complex file formats?

0 views
Skip to first unread message

Tuang

unread,
Oct 13, 2001, 8:32:10 PM10/13/01
to
I need to create and manage a document file format that will contain
several different types of information: a bunch of records containing
variable length text fields, plus a bunch of different types of
records, related to the first, also variable length, plus a bunch of
individual data items....

This is for an ordinary client-side Win32 app. Splitting the file into
multiple simpler files would make it a mess for the users. It would be
like breaking an Excel document into a cluster of three or four
related documents.

I'd be interested in any advice, and especially pointers to usable
code. Licensing a commercial database engine is overkill. Just
something that would allow for managing a document thru a nice API
that encapsulated the mechanics of reshuffling things everytime a
longer version of a string needed to be saved and that could know
where to find things.

I realize that this is asking a lot, but there was a relatively cheap
shareware utility that did just this for the Mac, more than 10 years
ago (long gone). It seems like such a common problem that I would
expect many more such utilities would be available now for a platform
1000x the size of the Mac platform 10 years ago.

Any ideas? Thanks.

Russ Freeman

unread,
Oct 14, 2001, 5:54:09 AM10/14/01
to
"Tuang" <tuan...@hotmail.com> wrote in message
news:df045d93.01101...@posting.google.com...

Sounds like you need structured storage. Lookup "StgCreateDocfile" or
"Structured storage". This would be my first option I think.

If that doesn't fit then perhaps this will:
-->http://www.gipsysoft.com/code/code/crandomfile.zip

It basically manages the process of stuffing randomly sized blocks of data
into a file. It allows deleting of those blocks and eventual reuse of the
freed space. It won't compile as-is because it uses some of my own array
type classes but it should be fairly trivial to 'port' it to STL or MFC
containers.


--
russ.
http://www.gipsysoft.com/qhtm/ - FREE HTML display in a small and light DLL
http://www.gipsysoft.com/ZoomPlus/ - Programmers Zoom Utility on Steroids
http://www.kingcoder.com/ - Contract software developer


Fraser Orr

unread,
Nov 14, 2001, 1:08:44 PM11/14/01
to
"Tuang" <tuan...@hotmail.com> wrote in message
news:df045d93.01101...@posting.google.com...
> I need to create and manage a document file format that will contain
> several different types of information: a bunch of records containing
> variable length text fields, plus a bunch of different types of
> records, related to the first, also variable length, plus a bunch of
> individual data items....

Sounds like XML to me. There are a variety of XML libraries
available, and MS went XML crazy in XP.

An alternative might be to use a parser tool like bison/yacc.
This would make the reading in of the file easier (though the
file output, which is usually much simpler would still need
hand coding.).

0 new messages