GITFORMAT-CHUNK(5) Git GITFORMAT-CHUNK(5) (NAME) gitformat-chunk - (chunk) (SYNOPSIS) gitformat-commit-graph(5) <> ( pack gitformat-pack(5) ). (DESCRIPTION) <<>> (chunks) . << >> (table of contents) . commit-graph multi-pack-index . multi-pack-index gitformat-pack(5) commit-graph gitformat-commit-graph(5) . (header) . . . . (C+1) C . : | Chunk ID (4 bytes) | Chunk Offset (8 bytes) | |--------------------|------------------------| | ID[0] | OFFSET[0] | | ... | ... | | ID[C] | OFFSET[C] | | 0x0000 | OFFSET[C+1] | (ID) (offset) . (network-byte order) . ID[i] OFFSET[i] () OFFSET[i+1] () . i OFFSET[i+1] OFFSET[i] . . . . : (trailing hash) OFFSET[C+1] . chunk-format.h . . (WRITING CHUNK-BASED FILE FORMATS) init_chunkfile() struct chunkfile struct hashfile . hashfile . add_chunk() . chunkfile . chunk_write_fn . hashfile write_chunkfile() . . free_chunkfile() struct chunkfile . hashfile . (READING CHUNK-BASED FILE FORMATS) (memory-mapped region) . chunk-format . struct chunkfile init_chunkfile(NULL) . read_table_of_contents() struct chunkfile . pair_chunk() read_chunk() : o pair_chunk() . . o read_chunk() chunk_read_fn . . (parsing) . free_chunkfile() struct chunkfile . . . (EXAMPLES) API (chunk-format) : o commit-graph: write_commit_graph_file() parse_commit_graph() commit-graph.c API commit-graph gitformat-commit-graph(5) . o multi-pack-index: write_midx_internal() load_multi_pack_index() midx.c API multi-pack-index multi-pack-index gitformat- pack(5) . (GIT) git(1) Git 2.55.0 2026-06-29 GITFORMAT-CHUNK(5)