Re: [FYI] pack idx format
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 15, 2006, 11:16 UTC
- Message-ID
- <Pine.LNX.4.63.0602151208181.9837@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <7vd5hpm2x0.fsf@assigned-by-dhcp.cox.net>
Hi,
On Wed, 15 Feb 2006, Junio C Hamano wrote:
Show 8 quoted lines
> [...] > > Before this main table, at the beginning of the idx file, there > is a table of 256 4-byte network byte order integers. This is > called "first-level fan-out". N-th entry of this table records > the offset into the main index for the first object whose object > name SHA1 starts with N+1. fanout[255] points at the end of > main index. The offset is expressed in 24-bytes unit.
The description of the n-th entry is not completely correct. How about something like this:
The fan-out table is sort of an index to the main table: It contains offsets into the main table, and all SHA1s starting with byte b are between fanout[b-1] .. fanout[b]-1 (or if b==0 between 0 .. fanout[0]-1).
Comments?
Ciao, Dscho