libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
DataStreamPayloadHeader Struct Reference

Header structure for a DataStreamPayloadBlock containing data stream payload. More...

#include <aaruformat/structs/flux.h>

Data Fields

uint32_t identifier
 Block identifier, must be BlockType::DataStreamPayloadBlock (0x4C505344, "DSPL").
uint16_t dataType
 Data type classification (value from DataType), e.g., FluxData or BitstreamData.
uint16_t compression
 Compression type: 0 = None, 1 = Lzma.
uint32_t cmpLength
 Compressed length in bytes (includes LZMA properties if compression = Lzma).
uint32_t length
 Uncompressed length in bytes.
uint64_t cmpCrc64
 CRC64-ECMA checksum of the compressed payload (or same as crc64 if uncompressed).
uint64_t crc64
 CRC64-ECMA checksum of the uncompressed payload.

Detailed Description

Header structure for a DataStreamPayloadBlock containing data stream payload.

This structure is the header of a DataStreamPayloadBlock, which contains a generic compressed data stream payload. The payload data immediately follows this header and may be compressed using LZMA compression. Currently used for flux capture data, but can be used for other data streams such as bitstreams or PNG data.

Data Type: The dataType field identifies the type of data stored in the payload. Common values include:

  • FluxData: Flux capture data (data and index buffers)
  • BitstreamData: Bitstream data This field enables the block to be self-describing and allows validation of the payload content.

Compression: The compression field indicates whether the payload is compressed:

  • 0 (None): Payload is stored uncompressed
  • 1 (Lzma): Payload is compressed using LZMA, with LZMA properties stored in the first 5 bytes of the compressed data

Checksums: Two CRC64 checksums are stored:

  • cmpCrc64: Checksum of the compressed payload (or same as crc64 if uncompressed)
  • crc64: Checksum of the uncompressed payload

Both checksums are validated when reading the payload to ensure data integrity.

Payload Layout: The uncompressed payload is an arbitrary stream of binary data. For flux captures, this consists of concatenated data and index buffers: [data_buffer][index_buffer], with the indexOffset from the corresponding FluxEntry indicating where the index buffer starts. For other data types, the layout is specific to the data type.

Note
The identifier field must match BlockType::DataStreamPayloadBlock (0x4C505344, "DSPL").
If compression is Lzma, cmpLength includes the 5-byte LZMA properties header.

Definition at line 242 of file flux.h.

Field Documentation

◆ cmpCrc64

uint64_t DataStreamPayloadHeader::cmpCrc64

CRC64-ECMA checksum of the compressed payload (or same as crc64 if uncompressed).

Definition at line 249 of file flux.h.

Referenced by aaruf_read_flux_capture(), and write_flux_capture_payload().

◆ cmpLength

uint32_t DataStreamPayloadHeader::cmpLength

Compressed length in bytes (includes LZMA properties if compression = Lzma).

Definition at line 247 of file flux.h.

Referenced by aaruf_read_flux_capture(), and write_flux_capture_payload().

◆ compression

uint16_t DataStreamPayloadHeader::compression

Compression type: 0 = None, 1 = Lzma.

Definition at line 246 of file flux.h.

Referenced by aaruf_read_flux_capture(), and write_flux_capture_payload().

◆ crc64

uint64_t DataStreamPayloadHeader::crc64

CRC64-ECMA checksum of the uncompressed payload.

Definition at line 250 of file flux.h.

Referenced by aaruf_read_flux_capture(), and write_flux_capture_payload().

◆ dataType

uint16_t DataStreamPayloadHeader::dataType

Data type classification (value from DataType), e.g., FluxData or BitstreamData.

Definition at line 245 of file flux.h.

Referenced by read_flux_payload_header(), and write_flux_capture_payload().

◆ identifier

uint32_t DataStreamPayloadHeader::identifier

Block identifier, must be BlockType::DataStreamPayloadBlock (0x4C505344, "DSPL").

Definition at line 244 of file flux.h.

Referenced by read_flux_payload_header(), and write_flux_capture_payload().

◆ length

uint32_t DataStreamPayloadHeader::length

Uncompressed length in bytes.

Definition at line 248 of file flux.h.

Referenced by aaruf_read_flux_capture(), and write_flux_capture_payload().


The documentation for this struct was generated from the following file:
  • include/aaruformat/structs/flux.h