|
libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
|
Packed on-disk metadata block headers for descriptive strings and CICM XML (if present). More...
Go to the source code of this file.
Data Structures | |
| struct | MetadataBlockHeader |
| Header for a metadata block containing offsets and lengths to UTF-16LE descriptive strings. More... | |
| struct | CicmMetadataBlock |
| Header for a CICM XML metadata block (identifier == BlockType::CicmBlock). More... | |
| struct | AaruMetadataJsonBlockHeader |
| Header for an Aaru metadata JSON block (identifier == BlockType::AaruMetadataJsonBlock). More... | |
Typedefs | |
| typedef struct MetadataBlockHeader | MetadataBlockHeader |
| typedef struct CicmMetadataBlock | CicmMetadataBlock |
| typedef struct AaruMetadataJsonBlockHeader | AaruMetadataJsonBlockHeader |
Packed on-disk metadata block headers for descriptive strings and CICM XML (if present).
Two metadata-related block header layouts are defined:
All multi-byte integers are little-endian. Structures are packed (1-byte alignment). All textual fields referenced by offsets are UTF-16LE, null-terminated (0x0000). Length fields include the terminating null (i.e. length >= 2 and an even number). Offsets are relative to the start of the corresponding block header (byte 0 = first byte of the header). No padding is implicitly added between strings; producers may pack them tightly or align them manually (alignment not required by the specification).
Metadata block layout (conceptual): MetadataBlockHeader (fixed size) <variable region holding each present UTF-16LE string in any order chosen by the writer>
Invariants / validation recommendations for MetadataBlockHeader:
CICM metadata block layout: CicmMetadataBlock (header) <length bytes of UTF-8 or XML text payload (implementation-defined, not null-terminated)>
NOTE: The library code reading these blocks must not assume strings are present; a zero length means the corresponding field is omitted. Offsets for omitted fields MAY be zero or arbitrary; readers should skip them whenever length == 0.
Definition in file metadata.h.
| typedef struct AaruMetadataJsonBlockHeader AaruMetadataJsonBlockHeader |
| typedef struct CicmMetadataBlock CicmMetadataBlock |
| typedef struct MetadataBlockHeader MetadataBlockHeader |