using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.CHD
{
///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public class HeaderV4 : Header
{
///
/// Flags
///
[MarshalAs(UnmanagedType.U4)]
public Flags Flags;
///
/// Compression type
///
[MarshalAs(UnmanagedType.U4)]
public CompressionType Compression;
///
/// Total # of hunks represented
///
public uint TotalHunks;
///
/// Logical size of the data (in bytes)
///
public ulong LogicalBytes;
///
/// Offset to the first blob of metadata
///
public ulong MetaOffset;
///
/// Number of bytes per hunk
///
public uint HunkBytes;
///
/// Combined raw+meta SHA1
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
public byte[] SHA1 = new byte[20];
///
/// Combined raw+meta SHA1 of parent
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
public byte[] ParentSHA1 = new byte[20];
///
/// Raw data SHA1
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
public byte[] RawSHA1 = new byte[20];
}
}