<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Single index entry describing a block's type, (optional) data classification, and file offset. <ahref="structIndexEntry.html#details">More...</a><br/></td></tr>
<divclass="textblock"><p>On‑disk index block header and entry structures (versions 1, 2 and 3). </p>
<p>The index provides a directory of all blocks contained in an Aaru image. Each index block starts with a versioned header (<aclass="el"href="structIndexHeader.html"title="Index header (version 1) for legacy images (identifier == IndexBlock).">IndexHeader</a> / <aclass="el"href="structIndexHeader2.html"title="Index header (version 2) with 64‑bit entry counter (identifier == IndexBlock2).">IndexHeader2</a> / <aclass="el"href="structIndexHeader3.html"title="Index header (version 3) adding hierarchical chaining (identifier == IndexBlock3).">IndexHeader3</a>) followed by a contiguous array of fixed‑size <aclass="el"href="structIndexEntry.html">IndexEntry</a> records. Version 3 adds support for hierarchical (chained / nested) subindexes.</p>
<p>Version mapping by block identifier (see <aclass="el"href="enums_8h.html#a54420623f26ab6bb61042b41cccf37a3">BlockType</a>):</p><ul>
<li>IndexBlock (v1) -><aclass="el"href="structIndexHeader.html">IndexHeader</a> followed by 16‑bit entry count entries.</li>
<li>IndexBlock2 (v2) -><aclass="el"href="structIndexHeader2.html">IndexHeader2</a> followed by 64‑bit entry count entries.</li>
<li>IndexBlock3 (v3) -><aclass="el"href="structIndexHeader3.html">IndexHeader3</a> with optional hierarchical subindex references.</li>
</ul>
<p>CRC coverage & endianness:</p><ul>
<li>The crc64 field stores a CRC64-ECMA over the entries array ONLY (header bytes are excluded).</li>
<li>For images with imageMajorVersion <= AARUF_VERSION_V1 a legacy writer byte-swapped the CRC; readers compensate (see verify_index_v1/v2/v3). The value in the header remains whatever was originally written.</li>
</ul>
<p>Hierarchical (v3) behavior:</p><ul>
<li>Entries whose blockType == IndexBlock3 refer to subindex blocks; readers recursively load and flatten.</li>
<li><aclass="el"href="structIndexHeader3.html#a33743c206cb10cc1d8ff2c7f9e61ddcf"title="File offset of a previous IndexBlock3 header (0 if none / root segment).">IndexHeader3::previous</a> can point to a preceding index segment (for append / incremental scenarios) or 0.</li>
<li>CRC of the main index does NOT cover subindex contents; each subindex has its own header + CRC.</li>
<li>identifier must equal the expected <aclass="el"href="enums_8h.html#a54420623f26ab6bb61042b41cccf37a3"title="List of known block types contained in an Aaru image.">BlockType</a> variant for that version.</li>
<li>crc64 must match recomputed CRC64( entries array ) (after legacy byte swap handling if required).</li>
<li>For v3, if previous != 0 it should point to another IndexBlock3 header (optional best‑effort check).</li>
</ul>
<p>Notes:</p><ul>
<li>Structures are packed (1‑byte alignment). All multi-byte integers are little‑endian on disk.</li>
<li>The index does not store per-entry CRC; integrity relies on each individual block's own CRC plus the index CRC.</li>
<li>dataType in <aclass="el"href="structIndexEntry.html">IndexEntry</a> is meaningful only for block types that carry typed data (e.g. DataBlock, DumpHardwareBlock, etc.).</li>
</ul>
<p>See also: <aclass="el"href="internal_8h.html#a89ed93d216c4dce0ae5e2acccf8cc2b4"title="Verifies the integrity of an index block (version 1) in the image stream.">verify_index_v1()</a>, <aclass="el"href="internal_8h.html#ae234e22b16b085d18614110630034db5"title="Verifies the integrity of an index block (version 2) in the image stream.">verify_index_v2()</a>, <aclass="el"href="internal_8h.html#ad7ed9250463c320c7bc8d83689bcfefb"title="Verifies the integrity of an index block (version 3) in the image stream.">verify_index_v3()</a> for integrity procedures. </p>
<pclass="definition">Definition in file <aclass="el"href="index_8h_source.html">index.h</a>.</p>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.15.0 </li>