Re: Question about the pack OBJ_OFS_DELTA format
Jeff King <peff@peff.net> writes:
Show 16 quoted lines
> The pack-format.txt file says:
>
> 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.
>
> but I think is missing two bits of information:
>
> - the bytes are in most-significant to least-significant order, which
> IIRC is the opposite of the size varint
>
> - each 7-bit byte sneaks in some extra data by implicitly adding "1"
> to all but the last byte
Isn't the latter mentioned in the paragraph you quoted?