Skip to main content

Module utils

Module utils 

Source
Expand description

Low-level helpers shared by object encode/decode routines: varint readers, type/size parsing, and thin zlib compression wrappers tuned for Git object formats.

Functionsยง

compress_zlib
parse_size_from_bytes
Parses a byte slice into a usize representing the size of a Git object.
read_bytes
Read the next N bytes from the reader
read_size_encoding
Read the type and size of the object
read_type_and_size
Read the first few fields of the object and parse
read_var_int_byte
Returns whether the first bit of u8 is 1 and returns the 7-bit truth value