serialization library

Fredrik Olsson peylow at gmail.com
Thu Nov 9 08:15:17 PST 2006


Bill Baxter skrev:
<snip>
> How do you fix it?  Very simple really.  Just store the file as a series 
> of chunks with fixed length headers, and each header contains the length 
> of the data in that chunk.  If you get a chunk header with a tag you 
> don't understand, just ignore it.  A particular chunk can have 
> sub-chunks too.  I think it's similar in many ways to a grammar definition:
> 
>   file:
>     header chunklist
> 
>   chunklist:
>     chunk
>     chunk chunklist
> 
>   header:
>     typeIndicator versionNumber DataEndianness
> 
>   chunk:
>     chunkHeader data
> 
>   chunkHeader:
>     chunkType DataLength
> 
>   data:
>     // Here's where you list all the types of data known to you
> 
> Or something like that.
> I'd like a library that helps me read and write my data in that sort of 
> data-structure independent format.
> 
What you want is a lib for reading and writing EA IFF-85 compatible files?

I actually have some code for D doing this around somewhere. Written to 
be able to read IFF graphics files and Lightwave 3D objects.

I shall dig up the code, clean it up in a presentable shape, and make it 
public.


// Fredrik Olsson

> --bb



More information about the Digitalmars-d-announce mailing list