libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
data.h File Reference

On-disk layout structures for data-bearing and geometry blocks. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  BlockHeader
 Header preceding the compressed data payload of a data block (BlockType::DataBlock). More...
struct  GeometryBlockHeader
 Legacy CHS style logical geometry metadata (BlockType::GeometryBlock). More...

Typedefs

typedef struct BlockHeader BlockHeader
typedef struct GeometryBlockHeader GeometryBlockHeader

Detailed Description

On-disk layout structures for data-bearing and geometry blocks.

These packed structures describe the headers that precede variable-length payloads inside blocks whose identifiers are enumerated in BlockType. All integer fields are stored little-endian on disk. The library currently assumes a little-endian host; if ported to a big-endian architecture explicit byte swapping will be required.

Layout of a data block (BlockType::DataBlock): BlockHeader (sizeof(BlockHeader) bytes) Compressed payload (cmpLength bytes)

Payload decoding:

Geometry block (BlockType::GeometryBlock) has a GeometryBlockHeader followed by no additional fixed payload in the current format version; it conveys legacy CHS-style logical geometry metadata.

Warning
These structs are packed; do not take their address and assume natural alignment.
See also
BlockType
DataType
CompressionType

Definition in file data.h.

Typedef Documentation

◆ BlockHeader

typedef struct BlockHeader BlockHeader

◆ GeometryBlockHeader

typedef struct GeometryBlockHeader GeometryBlockHeader