libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
data.c
Go to the documentation of this file.
1/*
2 * This file is part of the Aaru Data Preservation Suite.
3 * Copyright (c) 2019-2026 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
19#include <inttypes.h>
20#include <stdint.h>
21#include <stdio.h>
22#include <stdlib.h>
23
24#include "aaruformat.h"
25#include "internal.h"
26#include "log.h"
27#include "uthash.h"
28
71
73{
74 TRACE("Entering process_data_block(%p, %p)", ctx, entry);
75 BlockHeader block_header;
76 int pos = 0;
77 size_t read_bytes = 0;
78 size_t lzma_size = 0;
79 uint8_t *cmp_data = NULL;
80 uint8_t *cst_data = NULL;
81 mediaTagEntry *old_media_tag = NULL;
82 mediaTagEntry *media_tag = NULL;
83 uint8_t *data = NULL;
84 uint8_t lzma_properties[LZMA_PROPERTIES_LENGTH];
85
86 // Check if the context, index entry, and image stream are valid
87 if(ctx == NULL || entry == NULL || ctx->imageStream == NULL)
88 {
89 FATAL("Invalid context or image stream.");
91 }
92
93 // Seek to block
94 pos = aaruf_fseek(ctx->imageStream, (aaru_off_t)entry->offset, SEEK_SET);
95 if(pos < 0 || aaruf_ftell(ctx->imageStream) != (aaru_off_t)entry->offset)
96 {
97 FATAL("Could not seek to %" PRIu64 " as indicated by index entry...", entry->offset);
98
100 }
101
102 // Even if those two checks shall have been done before
103
104 // NOP block, skip
105 if(entry->dataType == kDataTypeNone || (entry->dataType == kDataTypeUserData && ctx->header.biggestSectorSize > 0))
106 {
107 TRACE("NoData block found, skipping");
108 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
109 return AARUF_STATUS_OK;
110 }
111
112 TRACE("Reading block header at position %" PRIu64, entry->offset);
113 read_bytes = fread(&block_header, 1, sizeof(BlockHeader), ctx->imageStream);
114
115 if(read_bytes != sizeof(BlockHeader))
116 {
117 FATAL("Could not read block header at %" PRIu64, entry->offset);
118
119 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
120 return AARUF_STATUS_OK;
121 }
122
123 ctx->image_info.ImageSize += block_header.cmpLength;
124
125 // Unused, skip
126 if(entry->dataType == kDataTypeUserData)
127 {
128 if(block_header.sectorSize > ctx->image_info.SectorSize)
129 {
130 TRACE("Setting sector size to %" PRIu64 " bytes", block_header.sectorSize);
131 ctx->image_info.SectorSize = block_header.sectorSize;
132 }
133
134 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
135 return AARUF_STATUS_OK;
136 }
137
138 if(block_header.identifier != entry->blockType)
139 {
140 TRACE("Incorrect identifier for data block at position %" PRIu64, entry->offset);
141
142 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
143 return AARUF_STATUS_OK;
144 }
145
146 if(block_header.type != entry->dataType)
147 {
148 TRACE("Expected block with data type %4.4s at position %" PRIu64 " but found data type %4.4s",
149 (char *)&entry->blockType, entry->offset, (char *)&block_header.type);
150
151 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
152 return AARUF_STATUS_OK;
153 }
154
155 TRACE("Found data block with type %4.4s at position %" PRIu64, (char *)&entry->blockType, entry->offset);
156
157 if(block_header.compression == kCompressionLzma || block_header.compression == kCompressionLzmaCst)
158 {
159 int error_no = 0;
160 if(block_header.compression == kCompressionLzmaCst && block_header.type != kDataTypeCdSubchannel)
161 {
162 TRACE("Invalid compression type %u for block with data type %u, continuing...", block_header.compression,
163 block_header.type);
164
165 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
166 return AARUF_STATUS_OK;
167 }
168
169 if(block_header.cmpLength < LZMA_PROPERTIES_LENGTH)
170 {
171 TRACE("Compressed block length %" PRIu32 " too small for LZMA properties, continuing...",
172 block_header.cmpLength);
173 TRACE("Exiting process_data_block() = AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK");
175 }
176
177 lzma_size = block_header.cmpLength - LZMA_PROPERTIES_LENGTH;
178
179 cmp_data = (lzma_size == 0) ? NULL : (uint8_t *)malloc(lzma_size);
180 if(lzma_size != 0 && cmp_data == NULL)
181 {
182 TRACE("Cannot allocate memory for block, continuing...");
183
184 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
185 return AARUF_STATUS_OK;
186 }
187
188 if(block_header.length != 0)
189 {
190 data = (uint8_t *)malloc(block_header.length);
191 if(data == NULL)
192 {
193 TRACE("Cannot allocate memory for block, continuing...");
194 free(cmp_data);
195
196 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
197 return AARUF_STATUS_OK;
198 }
199 }
200 else
201 data = NULL;
202
203 read_bytes = fread(lzma_properties, 1, LZMA_PROPERTIES_LENGTH, ctx->imageStream);
204 if(read_bytes != LZMA_PROPERTIES_LENGTH)
205 {
206 TRACE("Could not read LZMA properties, continuing...");
207 free(cmp_data);
208 free(data);
209
210 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
211 return AARUF_STATUS_OK;
212 }
213
214 if(lzma_size != 0)
215 {
216 read_bytes = fread(cmp_data, 1, lzma_size, ctx->imageStream);
217 if(read_bytes != lzma_size)
218 {
219 TRACE("Could not read compressed block, continuing...");
220 free(cmp_data);
221 free(data);
222
223 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
224 return AARUF_STATUS_OK;
225 }
226 }
227
228 if(block_header.length != 0)
229 {
230 read_bytes = block_header.length;
231 error_no = aaruf_lzma_decode_buffer(data, &read_bytes, cmp_data, &lzma_size, lzma_properties,
233
234 if(error_no != 0)
235 {
236 TRACE("Got error %d from LZMA, continuing...", error_no);
237 free(cmp_data);
238 free(data);
239
240 TRACE("Exiting process_data_block() = AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK");
242 }
243
244 if(read_bytes != block_header.length)
245 {
246 TRACE("Error decompressing block, expected %" PRIu32 " bytes but got %zu bytes, continuing...",
247 block_header.length, read_bytes);
248 free(cmp_data);
249 free(data);
250
251 TRACE("Exiting process_data_block() = AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK");
253 }
254 }
255 else if(lzma_size != 0)
256 {
257 TRACE("Compressed payload present for zero-length block, continuing...");
258 free(cmp_data);
259
260 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
261 return AARUF_STATUS_OK;
262 }
263
264 if(block_header.compression == kCompressionLzmaCst && block_header.length != 0)
265 {
266 cst_data = (uint8_t *)malloc(block_header.length);
267 if(cst_data == NULL)
268 {
269 TRACE("Cannot allocate memory for block, continuing...");
270 free(cmp_data);
271 free(data);
272
273 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
274 return AARUF_STATUS_OK;
275 }
276
277 aaruf_cst_untransform(data, cst_data, block_header.length);
278 free(data);
279 data = cst_data;
280 cst_data = NULL;
281 }
282
283 free(cmp_data);
284 }
285 else if(block_header.compression == kCompressionZstd || block_header.compression == kCompressionZstdCst)
286 {
287 if(block_header.compression == kCompressionZstdCst && block_header.type != kDataTypeCdSubchannel)
288 {
289 TRACE("Invalid compression type %u for block with data type %u, continuing...", block_header.compression,
290 block_header.type);
291 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
292 return AARUF_STATUS_OK;
293 }
294
295 cmp_data = (block_header.cmpLength == 0) ? NULL : (uint8_t *)malloc(block_header.cmpLength);
296 if(block_header.cmpLength != 0 && cmp_data == NULL)
297 {
298 TRACE("Cannot allocate memory for compressed block, continuing...");
299 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
300 return AARUF_STATUS_OK;
301 }
302
303 if(block_header.length != 0)
304 {
305 data = (uint8_t *)malloc(block_header.length);
306 if(data == NULL)
307 {
308 TRACE("Cannot allocate memory for block, continuing...");
309 free(cmp_data);
310 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
311 return AARUF_STATUS_OK;
312 }
313 }
314 else
315 data = NULL;
316
317 if(block_header.cmpLength != 0)
318 {
319 read_bytes = fread(cmp_data, 1, block_header.cmpLength, ctx->imageStream);
320 if(read_bytes != block_header.cmpLength)
321 {
322 TRACE("Could not read compressed block, continuing...");
323 free(cmp_data);
324 free(data);
325 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
326 return AARUF_STATUS_OK;
327 }
328 }
329
330 if(block_header.length != 0)
331 {
332 size_t decoded = aaruf_zstd_decode_buffer(data, block_header.length, cmp_data, block_header.cmpLength);
333
334 if(decoded != block_header.length)
335 {
336 TRACE("Error decompressing zstd block, expected %" PRIu32 " bytes but got %zu bytes, continuing...",
337 block_header.length, decoded);
338 free(cmp_data);
339 free(data);
340 TRACE("Exiting process_data_block() = AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK");
342 }
343 }
344
345 free(cmp_data);
346
347 if(block_header.compression == kCompressionZstdCst && block_header.length != 0)
348 {
349 cst_data = (uint8_t *)malloc(block_header.length);
350 if(cst_data == NULL)
351 {
352 TRACE("Cannot allocate memory for CST untransform, continuing...");
353 free(data);
354 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
355 return AARUF_STATUS_OK;
356 }
357
358 aaruf_cst_untransform(data, cst_data, block_header.length);
359 free(data);
360 data = cst_data;
361 cst_data = NULL;
362 }
363 }
364 else if(block_header.compression == kCompressionNone)
365 {
366 if(block_header.length != 0)
367 {
368 data = (uint8_t *)malloc(block_header.length);
369 if(data == NULL)
370 {
371 TRACE("Cannot allocate memory for block, continuing...");
372
373 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
374 return AARUF_STATUS_OK;
375 }
376 }
377 else
378 data = NULL;
379
380 read_bytes = (block_header.length == 0) ? 0 : fread(data, 1, block_header.length, ctx->imageStream);
381
382 if(block_header.length != 0 && read_bytes != block_header.length)
383 {
384 free(data);
385 TRACE("Could not read block, continuing...");
386
387 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
388 return AARUF_STATUS_OK;
389 }
390 }
391 else
392 {
393 TRACE("Found unknown compression type %d, continuing...", block_header.compression);
394
395 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
396 return AARUF_STATUS_OK;
397 }
398
399 if(block_header.length > 0)
400 {
401 uint64_t crc64 = aaruf_crc64_data(data, block_header.length);
402
403 // Due to how C# wrote it, it is effectively reversed
404 if(ctx->header.imageMajorVersion <= AARUF_VERSION_V1) crc64 = bswap_64(crc64);
405
406 if(crc64 != block_header.crc64)
407 {
408 TRACE("Incorrect CRC found: 0x%" PRIx64 " found, expected 0x%" PRIx64 ", continuing...", crc64,
409 block_header.crc64);
410 free(data);
411
412 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
413 return AARUF_STATUS_OK;
414 }
415 }
416
417 // Check if it's not a media tag, but a sector tag, and fill the appropriate table then
418 switch(entry->dataType)
419 {
423 else
424 ctx->sector_prefix = data;
425
428
429 break;
433 ctx->sector_suffix_corrected = data;
434 else
435 ctx->sector_suffix = data;
436
442 break;
444 ctx->sector_subchannel = data;
446 break;
448 ctx->sector_subchannel = data;
450 break;
452 ctx->sector_subchannel = data;
454 break;
456 ctx->sector_subchannel = data;
458 break;
460 ctx->mode2_subheaders = data;
461 break;
463 ctx->sector_id = data;
466 break;
468 ctx->sector_ied = data;
470 break;
472 ctx->sector_cpr_mai = data;
474 break;
476 ctx->sector_edc = data;
478 break;
480 ctx->sector_decrypted_title_key = data;
482 break;
484 ctx->sector_edc = data;
486 break;
487 default:
488 media_tag = (mediaTagEntry *)malloc(sizeof(mediaTagEntry));
489
490 if(media_tag == NULL)
491 {
492 TRACE("Cannot allocate memory for media tag entry.");
493 free(data);
494 data = NULL;
495 break;
496 }
497 memset(media_tag, 0, sizeof(mediaTagEntry));
498
499 media_tag->type = aaruf_get_media_tag_type_for_datatype(block_header.type);
500 media_tag->data = data;
501 media_tag->length = block_header.length;
502
503 HASH_REPLACE_INT(ctx->mediaTags, type, media_tag, old_media_tag);
504
505 if(old_media_tag != NULL)
506 {
507 TRACE("Replaced media tag with type %d", old_media_tag->type);
508 free(old_media_tag->data);
509 free(old_media_tag);
510 old_media_tag = NULL;
511 }
512
513 break;
514 }
515
516 TRACE("Exiting process_data_block() = AARUF_STATUS_OK");
517 return AARUF_STATUS_OK;
518}
#define LZMA_PROPERTIES_LENGTH
Size in bytes of the fixed LZMA properties header (lc/lp/pb + dictionary size).
Definition consts.h:82
#define AARUF_VERSION_V1
First on‑disk version (C# implementation).
Definition consts.h:71
int32_t process_data_block(aaruformat_context *ctx, IndexEntry *entry)
Processes a data block from the image stream.
Definition data.c:72
uint64_t aaruf_crc64_data(const uint8_t *data, uint32_t len)
Definition crc64.c:160
int32_t aaruf_lzma_decode_buffer(uint8_t *dst_buffer, size_t *dst_size, const uint8_t *src_buffer, size_t *src_size, const uint8_t *props, size_t props_size)
Decodes an LZMA-compressed buffer.
Definition lzma.c:39
int32_t aaruf_get_media_tag_type_for_datatype(int32_t type)
Converts an image data type to an Aaru media tag type.
Definition helpers.c:39
size_t aaruf_zstd_decode_buffer(uint8_t *dst_buffer, size_t dst_size, const uint8_t *src_buffer, size_t src_size)
Decodes a Zstandard-compressed buffer.
Definition zstd.c:34
int32_t aaruf_cst_untransform(const uint8_t *sequential, uint8_t *interleaved, size_t length)
Reverses the CST (Claunia's Subchannel Transform) transformation from sequential to interleaved data.
Definition cst.c:193
#define bswap_64(x)
Definition endian.h:81
@ kDataTypeDvdTitleKeyDecrypted
Decrypted DVD Title Key.
Definition enums.h:129
@ kDataTypeDvdSectorId
DVD Identification Data (ID).
Definition enums.h:130
@ kDataTypeAppleSonyTag
Apple Sony (12‑byte) tag.
Definition enums.h:120
@ kDataTypeCdSectorSuffix
Compact Disc sector suffix (EDC, ECC P, ECC Q).
Definition enums.h:117
@ kDataTypeNone
No data.
Definition enums.h:47
@ kDataTypeCdSubchannel
Compact Disc subchannel data.
Definition enums.h:118
@ kDataTypeCdSectorSuffixCorrected
Compact Disc sector suffix (EDC, ECC P, ECC Q) corrected-only stored.
Definition enums.h:124
@ kDataTypeBdSectorEdc
Blu-ray Sector EDC.
Definition enums.h:150
@ kDataTypeDvdSectorIed
DVD ID Error Detection Code (IED).
Definition enums.h:131
@ kDataTypeDvdSectorCprMai
DVD Copyright Management Information (CPR_MAI).
Definition enums.h:128
@ kDataTypePriamDataTowerTag
Priam Data Tower (24‑byte) tag.
Definition enums.h:121
@ kDataTypeUserData
User (main) data.
Definition enums.h:48
@ kDataTypeDvdSectorEdc
DVD Error Detection Code (EDC).
Definition enums.h:132
@ kDataTypeAppleProfileTag
Apple Profile (20‑byte) tag.
Definition enums.h:119
@ kDataTypeCdSubHeader
Compact Disc MODE 2 subheader.
Definition enums.h:125
@ kDataTypeCdSectorPrefix
Compact Disc sector prefix (sync, header).
Definition enums.h:116
@ kDataTypeCdSectorPrefixCorrected
Compact Disc sector prefix (sync, header) corrected-only stored.
Definition enums.h:123
@ kCompressionLzmaCst
LZMA applied to Claunia Subchannel Transform processed data.
Definition enums.h:36
@ kCompressionLzma
LZMA compression.
Definition enums.h:34
@ kCompressionNone
Not compressed.
Definition enums.h:33
@ kCompressionZstd
Zstandard compression.
Definition enums.h:37
@ kCompressionZstdCst
Zstandard applied to Claunia Subchannel Transform processed data.
Definition enums.h:38
#define AARUF_STATUS_OK
Sector present and read without uncorrectable errors.
Definition errors.h:81
#define AARUF_ERROR_CANNOT_READ_BLOCK
Generic block read failure (seek/read error).
Definition errors.h:46
#define AARUF_ERROR_NOT_AARUFORMAT
Input file/stream failed magic or structural validation.
Definition errors.h:40
#define AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK
Decompression routine failed or size mismatch.
Definition errors.h:56
@ kSectorTagBdSectorEdc
Blu-ray sector EDC, 4 bytes.
Definition aaru.h:982
@ kSectorTagCdHeader
4-byte CD header (minute, second, frame, mode)
Definition aaru.h:962
@ kSectorTagCdSync
12-byte CD sync pattern (00 FF*10 00)
Definition aaru.h:961
@ kSectorTagCdSubHeader
Mode 2 Form subheader (8 bytes: copy, submode, channel).
Definition aaru.h:963
@ kSectorTagDvdCmi
DVD Copyright Management Information (CSS).
Definition aaru.h:972
@ kSectorTagDvdSectorIed
DVD sector ID error detection, 2 bytes.
Definition aaru.h:978
@ kSectorTagCdSubchannel
96 raw subchannel bytes (P-W)
Definition aaru.h:968
@ kSectorTagAppleSony
Apple's Sony sector tags, 12 bytes (address prolog + checksum).
Definition aaru.h:960
@ kSectorTagCdEdc
32-bit CRC (EDC)
Definition aaru.h:964
@ kSectorTagAppleProfile
Apple's Profile sector tags, 20 bytes.
Definition aaru.h:980
@ kSectorTagCdEccP
172 bytes Reed-Solomon ECC (P)
Definition aaru.h:965
@ kSectorTagDvdSectorInformation
DVD sector information, 1 bytes.
Definition aaru.h:976
@ kSectorTagDvdSectorEdc
DVD sector EDC, 4 bytes.
Definition aaru.h:979
@ kSectorTagDvdSectorNumber
DVD sector number, 3 bytes.
Definition aaru.h:977
@ kSectorTagPriamDataTower
Priam DataTower sector tags, 24 bytes.
Definition aaru.h:981
@ kSectorTagCdEccQ
104 bytes Reed-Solomon ECC (Q)
Definition aaru.h:966
@ kSectorTagCdEcc
Combined P+Q ECC (276 bytes).
Definition aaru.h:967
@ kSectorTagDvdTitleKeyDecrypted
Decrypted DVD sector title key, 5 bytes.
Definition aaru.h:975
static int aaruf_fseek(FILE *stream, aaru_off_t offset, int origin)
Definition internal.h:46
static aaru_off_t aaruf_ftell(FILE *stream)
Definition internal.h:52
int64_t aaru_off_t
Definition internal.h:42
#define FATAL(fmt,...)
Definition log.h:40
#define TRACE(fmt,...)
Definition log.h:25
uint16_t biggestSectorSize
size of biggest sector in the image (in bytes).
Definition header.h:120
uint8_t imageMajorVersion
Container format major version.
Definition header.h:110
Header preceding the compressed data payload of a data block (BlockType::DataBlock).
Definition data.h:71
uint32_t cmpLength
Size in bytes of the compressed payload immediately following this header.
Definition data.h:76
uint32_t length
Size in bytes of the uncompressed payload resulting after decompression.
Definition data.h:77
uint32_t identifier
Block identifier, must be BlockType::DataBlock.
Definition data.h:72
uint32_t sectorSize
Size in bytes of each logical sector represented in this block.
Definition data.h:75
uint64_t crc64
CRC64-ECMA of the uncompressed payload (length bytes).
Definition data.h:79
uint16_t type
Logical data classification (value from DataType).
Definition data.h:73
uint16_t compression
Compression algorithm used (value from CompressionType).
Definition data.h:74
uint32_t SectorSize
Size of each logical sector in bytes (512, 2048, 2352, 4096, etc.).
Definition aaru.h:939
uint64_t ImageSize
Size of the image payload in bytes (excludes headers/metadata).
Definition aaru.h:937
Single index entry describing a block's type, (optional) data classification, and file offset.
Definition index.h:109
uint32_t blockType
Block identifier of the referenced block (value from BlockType).
Definition index.h:110
uint64_t offset
Absolute byte offset in the image where the referenced block header begins.
Definition index.h:112
uint16_t dataType
Data classification (value from DataType) or unused for untyped blocks.
Definition index.h:111
Master context representing an open or in‑creation Aaru image.
Definition context.h:175
uint8_t * sector_cpr_mai
DVD sector CPR_MAI (6 bytes) if present.
Definition context.h:210
uint8_t * sector_prefix_corrected
Corrected variant (post error correction) if stored.
Definition context.h:203
uint8_t * sector_ied
DVD sector IED (2 bytes) if present.
Definition context.h:209
uint8_t * sector_prefix
Raw per-sector prefix (e.g., sync+header) uncorrected.
Definition context.h:202
uint8_t * sector_edc
DVD sector EDC (4 bytes) if present.
Definition context.h:211
uint8_t * sector_suffix
Raw per-sector suffix (EDC/ECC) uncorrected.
Definition context.h:204
AaruHeaderV2 header
Parsed container header (v2).
Definition context.h:178
mediaTagEntry * mediaTags
Hash table of extra media tags (uthash root).
Definition context.h:267
uint8_t * sector_decrypted_title_key
DVD decrypted title key (5 bytes) if present.
Definition context.h:212
uint8_t * sector_subchannel
Raw 96-byte subchannel (if captured).
Definition context.h:206
FILE * imageStream
Underlying FILE* stream (binary mode).
Definition context.h:179
uint8_t * mode2_subheaders
MODE2 Form1/Form2 8-byte subheaders (concatenated).
Definition context.h:207
ImageInfo image_info
Exposed high-level image info summary.
Definition context.h:263
uint8_t * sector_id
DVD sector ID (4 bytes) if present.
Definition context.h:208
bool * readableSectorTags
Per-sector boolean array (optical tags read successfully?).
Definition context.h:266
uint8_t * sector_suffix_corrected
Corrected suffix if stored separately.
Definition context.h:205
Hash table entry for an arbitrary media tag (e.g., proprietary drive/medium descriptor).
Definition context.h:122
uint8_t * data
Tag data blob (opaque to library core); length bytes long.
Definition context.h:123
int32_t type
Numeric type identifier.
Definition context.h:124
uint32_t length
Length in bytes of data.
Definition context.h:125