Re: [PATCH 02/23] midx: add midx format details to pack-format.txt
- From
Stefan Beller <sbeller@google.com>
- Date
- Jun 18, 2018, 19:41 UTC
- Message-ID
- <CAGZ79ka+RA2jUb-VmDMGwCN80LARTz1Ku5ZMP-PbabEhpNtGCQ@mail.gmail.com>
- In-Reply-To
- <a0dbd78c-507b-3005-c2eb-2fa82e7d29ec@gmail.com>
Show 16 quoted lines
> >> + (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