From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Erik Fastermann <erik@fastermann.de>, git@vger.kernel.org
Subject: Re: Question about the pack OBJ_OFS_DELTA format
Date: Fri, 10 Jan 2020 11:41:08 -0800 [thread overview]
Message-ID: <xmqq1rs7m757.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20200110095707.GA459765@coredump.intra.peff.net> (Jeff King's message of "Fri, 10 Jan 2020 04:57:07 -0500")
Jeff King <peff@peff.net> 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?
next prev parent reply other threads:[~2020-01-10 19:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 8:26 Question about the pack OBJ_OFS_DELTA format Erik Fastermann
2020-01-10 9:57 ` Jeff King
2020-01-10 13:56 ` Erik Fastermann
2020-01-10 19:41 ` Junio C Hamano [this message]
2020-01-11 9:56 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq1rs7m757.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=erik@fastermann.de \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).