gix_index::extension::end_of_index_entry

Function decode

source
pub fn decode(data: &[u8], object_hash: Kind) -> Option<usize>
Expand description

Decode the end of index entry extension, which is no more than a glorified offset to the first byte of all extensions to allow loading entries and extensions in parallel.

Itself it’s located at the end of the index file, which allows its location to be known and thus addressable. From there it’s possible to traverse the chunks of all set extensions, hash them, and compare that hash with all extensions stored prior to this one to assure they are correct.

If the checksum wasn’t matched, we will ignore this extension entirely.