Implement support for index v2.

This commit is contained in:
2025-08-01 21:18:48 +01:00
parent 4f25209145
commit 9a4c04b2ca
8 changed files with 224 additions and 71 deletions

View File

@@ -205,9 +205,11 @@ typedef enum
/** Block containing data */
DataBlock = 0x4B4C4244,
/** Block containing a deduplication table */
DeDuplicationTable = 0X2A544444,
DeDuplicationTable = 0x2A544444,
/** Block containing the index */
IndexBlock = 0X58444E49,
IndexBlock = 0x58444E49,
/** Block containing the index v2 */
IndexBlock2 = 0x32584449,
/** Block containing logical geometry */
GeometryBlock = 0x4D4F4547,
/** Block containing metadata */

View File

@@ -22,7 +22,8 @@
#pragma pack(push, 1)
/**Header for the index, followed by entries */
typedef struct IndexHeader {
typedef struct IndexHeader
{
/**Identifier, <see cref="BlockType.Index" /> */
uint32_t identifier;
/**How many entries follow this header */
@@ -31,8 +32,20 @@ typedef struct IndexHeader {
uint64_t crc64;
} IndexHeader;
/**Header for the index, followed by entries */
typedef struct IndexHeader2
{
/**Identifier, <see cref="BlockType.Index" /> */
uint32_t identifier;
/**How many entries follow this header */
uint64_t entries;
/**CRC64-ECMA of the index */
uint64_t crc64;
} IndexHeader2;
/**Index entry */
typedef struct IndexEntry {
typedef struct IndexEntry
{
/**Type of item pointed by this entry */
uint32_t blockType;
/**Type of data contained by the block pointed by this entry */
@@ -43,4 +56,4 @@ typedef struct IndexEntry {
#pragma pack(pop)
#endif //LIBAARUFORMAT_INDEX_H
#endif // LIBAARUFORMAT_INDEX_H