Pranav,
If you want to make one big file with lots of little binaries in it, and will just use a straight binary writer (as opposed to a database), then you will have to put up front (or in a separate info file or something) a table of contents, or at a minimum, before you write each chunk of data write the length. As in
XX XX XX XX YY YY.... XX XX XX XX YY YY .. file length binary data...file length binary data
So you would read the first four bytes, then read in the data, then you could skip forward to the next one, read those four bytes, etc.
- Tab
At 12:53 AM 2/10/04, Pranav Negandhi wrote:
Sorry for the repost. My earlier message didn't seem to get through.
-----Original Message----- From: Pranav Negandhi [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 12:16 To: Lingo-L Subject: File storage
I'm building an editor that lets users create simple templatised presentations and publish them. Users can import their own backgrounds, images and video clips and place text in predefined fields. The presentation has a fixed number of screens of information.
The movies will have to be protected ofcourse, so using savecastLib or saveMovie is out of the question. My plan is to make a playback engine that retrieves the contents of each screen and plunk them into their respective fields. The content files can reside in a subfolder, but I'd like to go for a safer solution such as combining all the images, text and video clips into one big data file. I know BinIO can do this...but there was a solution using FileIO for the same thing someplace. Can someone point me to that?
As an aside, I've _never_ ever created binary files. So one thing stumps me off - how in heavens name will I know at which position does one file end and another begin? Is there a commonly used end-of-chunk character? I need to be certain that the same character will not be used in any of the other files too, else that info will go kaput. Pointers, pointers...anyone?
I'm running this on Windows so far, but somewhere along the line I might have to make this x-plat.
Pranav Negandhi concept-I www.cimultimedia.com
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
