Skip to main content

header_len

Function header_len 

Source
pub fn header_len(stored: &[u8], hash: GitHashKind) -> Result<usize>
Expand description

How many bytes of a stored entry are header — everything before the compressed payload.

For a delta that includes the back-reference: the OFS_DELTA distance or the REF_DELTA oid. This is what a caller strips to get the payload, and it is derived by re-reading the grammar rather than remembered, so it cannot drift from what the walk parses.