From: Junio C Hamano Date: Fri, 10 Jan 2020 19:41:08 GMT Subject: Re: Question about the pack OBJ_OFS_DELTA format Message-ID: In-Reply-To: <20200110095707.GA459765@coredump.intra.peff.net> Jeff King writes: > 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?