> >> + (C + 1) * 12 bytes providing the chunk offsets: > >> + First 4 bytes describe chunk id. Value 0 is a terminating label. > >> + Other 8 bytes provide offset in current file for chunk to start. > >> + (Chunks are provided in file-order, so you can infer the length > >> + using the next chunk position if necessary.) > > It is so nice to have the header also have 12 bytes, so it fits right into the > > lookup table. So an alternative point of view: > > > > If a chunk needs to store more than 8 bytes, we'll have an offset after > > the first 4 bytes that describe the chunk, otherwise you can store the 8 bytes > > of information directly after the 4 bytes. > > "MIDX" is a special chunk and must come first (does it?) and only once > > as it contains the version number. > > This sounds feasible, but unnecessarily complicated. I don't think any > other chunk will be this small. I was just writing it as a way to test if I really understood what you said in the doc, not as a suggestion to incorporate it. Stefan