libaaruformat
1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
data.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
19
#ifndef LIBAARUFORMAT_DATA_H
20
#define LIBAARUFORMAT_DATA_H
21
22
#include <stdint.h>
// Fixed width integer types used in on-disk packed structs.
23
24
#pragma pack(push, 1)
25
54
70
typedef
struct
BlockHeader
71
{
72
uint32_t
identifier
;
73
uint16_t
type
;
74
uint16_t
compression
;
75
uint32_t
sectorSize
;
76
uint32_t
cmpLength
;
77
uint32_t
length
;
78
uint64_t
cmpCrc64
;
79
uint64_t
crc64
;
80
}
BlockHeader
;
81
90
typedef
struct
GeometryBlockHeader
91
{
92
uint32_t
identifier
;
93
uint32_t
cylinders
;
94
uint32_t
heads
;
95
uint32_t
sectorsPerTrack
;
96
}
GeometryBlockHeader
;
97
98
#pragma pack(pop)
99
100
#endif
// LIBAARUFORMAT_DATA_H
BlockHeader
Header preceding the compressed data payload of a data block (BlockType::DataBlock).
Definition
data.h:71
BlockHeader::cmpLength
uint32_t cmpLength
Size in bytes of the compressed payload immediately following this header.
Definition
data.h:76
BlockHeader::length
uint32_t length
Size in bytes of the uncompressed payload resulting after decompression.
Definition
data.h:77
BlockHeader::identifier
uint32_t identifier
Block identifier, must be BlockType::DataBlock.
Definition
data.h:72
BlockHeader::sectorSize
uint32_t sectorSize
Size in bytes of each logical sector represented in this block.
Definition
data.h:75
BlockHeader::cmpCrc64
uint64_t cmpCrc64
CRC64-ECMA of the compressed payload (cmpLength bytes).
Definition
data.h:78
BlockHeader::crc64
uint64_t crc64
CRC64-ECMA of the uncompressed payload (length bytes).
Definition
data.h:79
BlockHeader::type
uint16_t type
Logical data classification (value from DataType).
Definition
data.h:73
BlockHeader::compression
uint16_t compression
Compression algorithm used (value from CompressionType).
Definition
data.h:74
GeometryBlockHeader
Legacy CHS style logical geometry metadata (BlockType::GeometryBlock).
Definition
data.h:91
GeometryBlockHeader::identifier
uint32_t identifier
Block identifier, must be BlockType::GeometryBlock.
Definition
data.h:92
GeometryBlockHeader::cylinders
uint32_t cylinders
Number of cylinders.
Definition
data.h:93
GeometryBlockHeader::heads
uint32_t heads
Number of heads (tracks per cylinder).
Definition
data.h:94
GeometryBlockHeader::sectorsPerTrack
uint32_t sectorsPerTrack
Number of sectors per track.
Definition
data.h:95
include
aaruformat
structs
data.h
Generated by
1.14.0