Skip to main content

Module utils

Module utils 

Source
Expand description

Shared I/O utilities for Git-internal including buffered readers, the streaming hash abstraction over SHA-1 / SHA-256 / BLAKE3-256, and helpers for reading pack/file bytes while tracking stream progress.

Structs§

CountingReader
A lightweight wrapper that counts bytes read from the underlying reader. replace deflate.intotal() in decompress_data

Enums§

HashAlgorithm
A streaming hasher abstraction over the supported HashKinds.

Functions§

read_bytes
Read exactly len bytes from the given reader.
read_sha
Read an object hash from the given reader using the thread-local HashKind.
read_sha_for_kind
Read an object hash of an explicit kind from the given reader.