libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
flux.h
Go to the documentation of this file.
1/*
2 * This file is part of the Aaru Data Preservation Suite.
3 * Copyright (c) 2019-2025 Natalia Portillo.
4 *
5 * This library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 */
18
86
87#ifndef LIBAARUFORMAT_FLUX_H
88#define LIBAARUFORMAT_FLUX_H
89
90#include <stdint.h>
91
92#pragma pack(push, 1)
93
116typedef struct FluxHeader
117{
118 uint32_t identifier;
119 uint16_t entries;
121 uint64_t crc64;
123
155typedef struct FluxEntry
156{
157 uint32_t head;
158 uint16_t track;
159 uint8_t subtrack;
160 uint32_t captureIndex;
162 uint64_t dataResolution;
163 uint64_t indexOffset;
164 uint64_t payloadOffset;
166
182typedef struct FluxCaptureMeta
183{
184 uint32_t head;
185 uint16_t track;
186 uint8_t subtrack;
187 uint32_t captureIndex;
189 uint64_t dataResolution;
191
204
243{
244 uint32_t identifier;
245 uint16_t dataType;
246 uint16_t compression;
247 uint32_t cmpLength;
248 uint32_t length;
249 uint64_t cmpCrc64;
250 uint64_t crc64;
252
278
296typedef struct FluxCaptureKey
297{
298 uint32_t head;
299 uint16_t track;
300 uint8_t subtrack;
301 uint32_t captureIndex;
303
304#pragma pack(pop)
305
306#endif // LIBAARUFORMAT_FLUX_H
Header structure for a DataStreamPayloadBlock containing data stream payload.
Definition flux.h:243
uint16_t dataType
Data type classification (value from DataType), e.g., FluxData or BitstreamData.
Definition flux.h:245
uint32_t cmpLength
Compressed length in bytes (includes LZMA properties if compression = Lzma).
Definition flux.h:247
uint64_t cmpCrc64
CRC64-ECMA checksum of the compressed payload (or same as crc64 if uncompressed).
Definition flux.h:249
uint32_t identifier
Block identifier, must be BlockType::DataStreamPayloadBlock (0x4C505344, "DSPL").
Definition flux.h:244
uint16_t compression
Compression type: 0 = None, 1 = Lzma.
Definition flux.h:246
uint32_t length
Uncompressed length in bytes.
Definition flux.h:248
uint64_t crc64
CRC64-ECMA checksum of the uncompressed payload.
Definition flux.h:250
Key structure for flux capture lookup map.
Definition flux.h:297
uint16_t track
Track number identifying the capture location.
Definition flux.h:299
uint8_t subtrack
Subtrack number identifying the capture location.
Definition flux.h:300
uint32_t head
Head number identifying the capture location.
Definition flux.h:298
uint32_t captureIndex
Capture index, allowing multiple captures for the same location.
Definition flux.h:301
Internal hash table entry for flux capture lookup.
Definition flux.c:34
Metadata structure returned by aaruf_get_flux_captures().
Definition flux.h:183
uint32_t head
Head number the flux capture corresponds to.
Definition flux.h:184
uint64_t indexResolution
Resolution in picoseconds at which the index stream was sampled.
Definition flux.h:188
uint32_t captureIndex
Capture index, allowing multiple captures for the same location.
Definition flux.h:187
uint8_t subtrack
Subtrack number the flux capture corresponds to.
Definition flux.h:186
uint64_t dataResolution
Resolution in picoseconds at which the data stream was sampled.
Definition flux.h:189
uint16_t track
Track number the flux capture corresponds to.
Definition flux.h:185
Internal structure for storing flux capture data during write mode.
Definition flux.h:271
FluxEntry entry
Flux entry metadata describing this capture.
Definition flux.h:272
uint32_t data_length
Length of the data buffer in bytes.
Definition flux.h:274
uint32_t index_length
Length of the index buffer in bytes.
Definition flux.h:276
uint8_t * index_buffer
Pointer to the flux index buffer. Owned by the utarray, freed automatically.
Definition flux.h:275
uint8_t * data_buffer
Pointer to the flux data buffer. Owned by the utarray, freed automatically.
Definition flux.h:273
Metadata entry describing a single flux capture in the FluxDataBlock.
Definition flux.h:156
uint64_t indexResolution
Resolution in picoseconds at which the index stream was sampled.
Definition flux.h:161
uint64_t dataResolution
Resolution in picoseconds at which the data stream was sampled.
Definition flux.h:162
uint32_t head
Head number the flux capture corresponds to. Typically 0 or 1 for double-sided media.
Definition flux.h:157
uint64_t payloadOffset
Block-aligned file offset where the DataStreamPayloadBlock containing this capture's data is stored,...
Definition flux.h:164
uint16_t track
Track number the flux capture corresponds to. Track numbering is format-dependent.
Definition flux.h:158
uint64_t indexOffset
Byte offset within the payload where the index buffer starts (equals data_length).
Definition flux.h:163
uint8_t subtrack
Subtrack number, allowing sub-stepping within a track. Used for fine positioning.
Definition flux.h:159
uint32_t captureIndex
Capture index, allowing multiple captures for the same location (e.g., multiple revolutions).
Definition flux.h:160
Header structure for a FluxDataBlock containing flux capture metadata.
Definition flux.h:117
uint32_t identifier
Block identifier, must be BlockType::FluxDataBlock (0x58554C46, "FLUX").
Definition flux.h:118
uint16_t entries
Number of FluxEntry records following this header. Maximum value: 65535.
Definition flux.h:119
uint64_t crc64
CRC64-ECMA checksum of the FluxEntry array (header excluded).
Definition flux.h:121
uint8_t blockAlignmentShift
Block alignment shift: 2^blockAlignmentShift = block alignment boundary in bytes.
Definition flux.h:120