Introduction
A pack index is the file Git keeps beside a packfile. It lists the names of the objects in the pack and where each one starts, so that Git can find an object without reading the whole pack. There are two versions.
Structure
The file is binary and big-endian. Version 1 has no header: it begins with a table of
256 counts (the fan-out table), then the object offsets and names in name order. Version
2 begins with the bytes FF 74 4F 63 and the version number 2, then the
fan-out table, the object names, a CRC32 table, the offsets and, when needed, a table of
8-byte offsets. Both end with the pack’s checksum and the index’s own.
Not described
Known, not yet covered
- Reference: this page is a summary; the two layouts are not yet described field by field on this site.
- Viewer: the site has no viewer for pack indexes.
Also used for
- VobSub subtitle index – Ripped DVD subtitles: a text index pointing into a .sub file of images.
Links
Software
- Git – writes and reads pack indexes
Reference
- gitformat-pack – Git’s own description of the pack and index formats