libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
DdtHeader Struct Reference

Header preceding a version 1 (flat) deduplication table body. More...

`#include <aaruformat/structs/ddt.h>`

## Data Fields
uint32_t | identifier
| Block identifier, must be BlockType::DeDuplicationTable.
uint16_t | type
| Data classification (DataType) for sectors referenced by this table.
uint16_t | compression
| Compression algorithm for the table body (CompressionType).
uint8_t | shift
| Left shift applied to per-entry file offset component forming logicalEntryValue.
uint64_t | entries
| Number of deduplication entries contained in (uncompressed) table.
uint64_t | cmpLength
| Size in bytes of compressed entries payload.
uint64_t | length
| Size in bytes of uncompressed entries payload.
uint64_t | cmpCrc64
| CRC64-ECMA of the compressed payload.
uint64_t | crc64
| CRC64-ECMA of the uncompressed payload.

## Detailed Description

Header preceding a version 1 (flat) deduplication table body.

Immediately after this header there are entries table records (compressed if compression != None). Each table record encodes a pointer using an 8-bit file offset component and a sector offset inside a block: logicalEntryValue = ((uint64_t)fileByteOffset << shift) + sectorOffsetWithinBlock where fileByteOffset is measured in bytes (granularity depends on shift) and sectorOffsetWithinBlock is relative to the start of the referenced data block. The sector size must be taken from the corresponding data block(s) (see BlockHeader::sectorSize) or higher-level metadata.

Invariants:

- cmpLength == length if compression == CompressionType::None
- length % (entrySize) == 0 after decompression (implementation-defined entry size)
- entries * entrySize == length
- entries > 0 implies length > 0

Definition at line 65 of file ddt.h.

## Field Documentation

## ◆ cmpCrc64

uint64_t DdtHeader::cmpCrc64

CRC64-ECMA of the compressed payload.

Definition at line 74 of file ddt.h.

Referenced by aaruf_verify_image().

## ◆ cmpLength

uint64_t DdtHeader::cmpLength

Size in bytes of compressed entries payload.

Definition at line 72 of file ddt.h.

Referenced by aaruf_verify_image(), and process_ddt_v1().

## ◆ compression

uint16_t DdtHeader::compression

Compression algorithm for the table body (CompressionType).

Definition at line 69 of file ddt.h.

Referenced by process_ddt_v1().

## ◆ crc64

uint64_t DdtHeader::crc64

CRC64-ECMA of the uncompressed payload.

Definition at line 75 of file ddt.h.

## ◆ entries

uint64_t DdtHeader::entries

Number of deduplication entries contained in (uncompressed) table.

Definition at line 71 of file ddt.h.

Referenced by process_ddt_v1().

## ◆ identifier

uint32_t DdtHeader::identifier

Block identifier, must be BlockType::DeDuplicationTable.

Definition at line 67 of file ddt.h.

## ◆ length

uint64_t DdtHeader::length

Size in bytes of uncompressed entries payload.

Definition at line 73 of file ddt.h.

Referenced by process_ddt_v1().

## ◆ shift

uint8_t DdtHeader::shift

Left shift applied to per-entry file offset component forming logicalEntryValue.

Definition at line 70 of file ddt.h.

Referenced by process_ddt_v1().

## ◆ type

uint16_t DdtHeader::type

Data classification (DataType) for sectors referenced by this table.

Definition at line 68 of file ddt.h.

The documentation for this struct was generated from the following file:

- include/aaruformat/structs/ddt.h