mirror of
https://github.com/aaru-dps/imhex-patterns.git
synced 2025-12-16 11:14:38 +00:00
Add DDT2 to AaruFormat.
This commit is contained in:
@@ -721,7 +721,7 @@ enum BlockType : u32
|
|||||||
{
|
{
|
||||||
DataBlock = 0x4B4C4244,
|
DataBlock = 0x4B4C4244,
|
||||||
DeDuplicationTable = 0x2A544444,
|
DeDuplicationTable = 0x2A544444,
|
||||||
DeDuplicationTable2 = 0x32454444,
|
DeDuplicationTable2 = 0x32544444,
|
||||||
Index = 0x58444E49,
|
Index = 0x58444E49,
|
||||||
Index2 = 0x32584449,
|
Index2 = 0x32584449,
|
||||||
Index3 = 0x33584449,
|
Index3 = 0x33584449,
|
||||||
@@ -812,6 +812,58 @@ struct DdtHeader
|
|||||||
u8 data[cmpLength];
|
u8 data[cmpLength];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct DdtHeader2
|
||||||
|
{
|
||||||
|
/**Identifier, <see cref="BlockType.DeDuplicationTable" /> */
|
||||||
|
BlockType identifier;
|
||||||
|
/**Type of data pointed by this DDT */
|
||||||
|
DataType type;
|
||||||
|
/**Compression algorithm used to compress the DDT */
|
||||||
|
CompressionType compression;
|
||||||
|
/**How many levels of subtables are present */
|
||||||
|
u8 levels;
|
||||||
|
/**Which level this table belongs to */
|
||||||
|
u8 tableLevel;
|
||||||
|
/**Pointer to absolute byte offset in file where the previous level table is located */
|
||||||
|
u64 previousLevelOffset;
|
||||||
|
/**Negative displacement of LBAs */
|
||||||
|
u16 negative;
|
||||||
|
/**Number of blocks in media */
|
||||||
|
u64 blocks;
|
||||||
|
/**Positive overflow displacement of LBAs */
|
||||||
|
u16 overflow;
|
||||||
|
/**First LBA contained in this table */
|
||||||
|
u64 start;
|
||||||
|
/**Block alignment boundaries */
|
||||||
|
u8 blockAlignmentShift;
|
||||||
|
/**Data shift */
|
||||||
|
u8 dataShift;
|
||||||
|
/**Table shift */
|
||||||
|
u8 tableShift;
|
||||||
|
/**Size type */
|
||||||
|
u8 sizeType;
|
||||||
|
/**Entries in this table */
|
||||||
|
u64 entries;
|
||||||
|
/**Compressed length for the DDT */
|
||||||
|
type::Size<u64> cmpLength;
|
||||||
|
/**Uncompressed length for the DDT */
|
||||||
|
type::Size<u64> length;
|
||||||
|
/**CRC64-ECMA of the compressed DDT */
|
||||||
|
type::Hex<u64> cmpCrc64;
|
||||||
|
/**CRC64-ECMA of the uncompressed DDT */
|
||||||
|
type::Hex<u64> crc64;
|
||||||
|
|
||||||
|
// TODO: Decompress ?
|
||||||
|
if(compression == CompressionType::None)
|
||||||
|
if(sizeType == 0)
|
||||||
|
u16 ddt[entries];
|
||||||
|
else
|
||||||
|
u32 ddt[entries];
|
||||||
|
else
|
||||||
|
u8 data[cmpLength];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
struct BlockHeader
|
struct BlockHeader
|
||||||
{
|
{
|
||||||
BlockType identifier;
|
BlockType identifier;
|
||||||
@@ -1069,6 +1121,7 @@ struct IndexEntry
|
|||||||
{
|
{
|
||||||
(BlockType::DataBlock): BlockHeader *dataBlock : u64 [[inline]];
|
(BlockType::DataBlock): BlockHeader *dataBlock : u64 [[inline]];
|
||||||
(BlockType::DeDuplicationTable): DdtHeader *deduplicationTable : u64 [[inline]];
|
(BlockType::DeDuplicationTable): DdtHeader *deduplicationTable : u64 [[inline]];
|
||||||
|
(BlockType::DeDuplicationTable2): DdtHeader2 *deduplicationTable2 : u64 [[inline]];
|
||||||
(BlockType::GeometryBlock): GeometryBlock *geometry : u64 [[inline]];
|
(BlockType::GeometryBlock): GeometryBlock *geometry : u64 [[inline]];
|
||||||
(BlockType::MetadataBlock): MetadataBlock *metadata : u64 [[inline]];
|
(BlockType::MetadataBlock): MetadataBlock *metadata : u64 [[inline]];
|
||||||
(BlockType::TracksBlock): TracksHeader *tracks : u64 [[inline]];
|
(BlockType::TracksBlock): TracksHeader *tracks : u64 [[inline]];
|
||||||
|
|||||||
Reference in New Issue
Block a user