From: Shawn O. Pearce Date: Sun, 06 Apr 2008 22:26:36 GMT Subject: Re: [PATCH v3] Add description of OFS_DELTA to the pack format description Message-ID: <20080406222636.GP10274@spearce.org> In-Reply-To: <20080406205149.GD7075@bohr.gbar.dtu.dk> Peter Eriksen wrote: > - If it is DELTA, then > + If it is REF_DELTA, then > 20-byte base object name SHA1 (the size above is the > size of the delta data that follows). > delta data, deflated. > + If it is OFS_DELTA, then > + n-byte offset (see below) interpreted as a negative > + offset from the type-byte of the header of the > + ofs-delta entry (the size above is the size of > + the delta data that follows). > + delta data, deflated. > + > + offset encoding: > + n bytes with MSB set in all but the last one. > + The offset is then the number constructed by > + concatenating the lower 7 bit of each byte, and > + for n >= 2 adding 2^7 + 2^14 + ... + 2^(7*(n-1)) > + to the result. > + Yup. :-) Acked-by: Shawn O. Pearce -- Shawn.