libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
ddt.h File Reference

On-disk headers for Deduplication Data Tables (DDT) versions 1 and 2. More...

`#include <stdint.h>`

Go to the source code of this file.

## Data Structures
struct | DdtHeader
| Header preceding a version 1 (flat) deduplication table body. More...
struct | DdtHeader2
| Header preceding a version 2 hierarchical deduplication table. More...

## Typedefs
typedef struct DdtHeader | DdtHeader
typedef struct DdtHeader2 | DdtHeader2

## Detailed Description

On-disk headers for Deduplication Data Tables (DDT) versions 1 and 2.

A DDT maps logical sector indices (LBAs within an image's logical address space) to (block, sector) pairs plus a base file offset, enabling content de-duplication inside the container. Two generations exist:

- DdtHeader ("version 1") flat table.
- DdtHeader2 ("version 2") hierarchical, multi-level subtables for scalability.

All integers are little-endian. Structures are packed (1-byte alignment). When porting to a big-endian architecture callers must perform byte swapping. Do not rely on compiler-introduced padding.

Compression of the table body (entries array) follows the same conventions as data blocks: first decompress according to the compression enum, then validate CRC64 for uncompressed contents.

Related enumerations:

- BlockType::DeDuplicationTable / BlockType::DeDuplicationTable2
- CompressionType
- DataType
- DdtSizeType (for DdtHeader2::sizeType)

Definition in file ddt.h.

## Typedef Documentation

## ◆ DdtHeader

typedef struct DdtHeader DdtHeader

## ◆ DdtHeader2

typedef struct DdtHeader2 DdtHeader2