Skip to main content

decode_loose

Function decode_loose 

Source
pub fn decode_loose<'a>(
    compressed: &[u8],
    expected: ObjectId,
    storage: &'a mut [u8],
    window: &mut [u8; 32768],
    limits: InflateLimits,
) -> Result<Object<'a>>
Expand description

Decode exactly one loose response into caller-owned staging storage. Storage/limits include the Git header (at most 28 bytes) and body. A borrowed body is returned only after zlib, canonical header, length and ID validation. Discard staging bytes on error; concatenated streams/trailing bytes fail.