quote:
Originally posted by Millenium_edition
I've tried using 4 bytes instead of three, but converting from hex to decimal returns -1, so I didn't bother making it like that.
eh? you just have to store in those 4 bytes the integer not the decimal representation of it
quote:
Originally posted by Millenium_edition
no, sorry. it's a DLL, the developer can do what he wants with that, it's a choice to make.
I think I get you better now. So let's redefine the chuck format:
Name: this is an ID for the chunk. Fixed size or a string (null-terminated or with a byte-size identifier.). It's pourpose is identify the contents of the chunk.
Length: Length of the date field of the chuck. 4 bytes (from 0 to 2^32 - 1 bytes)
Data: The actual data of the chunk. Internal structure defined by the program/developer that use the DLL. From 0 to 2^32 - 1 bytes. There's on need to be other fields into the chunk. Comments, checksums, etc... may (have to) be included inside this data field and it's up to the developer use/check/manage them.