mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-12 01:03:10 +00:00
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace SabreTools.Data.Models.CHD
|
|
{
|
|
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
|
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
|
public class HeaderV5 : Header
|
|
{
|
|
/// <summary>
|
|
/// Which custom compressors are used?
|
|
/// </summary>
|
|
/// <remarks>There should be 4 entries</remarks>
|
|
public CodecType[] Compressors { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Logical size of the data (in bytes)
|
|
/// </summary>
|
|
public ulong LogicalBytes { get; set; }
|
|
|
|
/// <summary>
|
|
/// Offset to the map
|
|
/// </summary>
|
|
public ulong MapOffset { get; set; }
|
|
|
|
/// <summary>
|
|
/// Offset to the first blob of metadata
|
|
/// </summary>
|
|
public ulong MetaOffset { get; set; }
|
|
|
|
/// <summary>
|
|
/// Number of bytes per hunk (512k maximum)
|
|
/// </summary>
|
|
public uint HunkBytes { get; set; }
|
|
|
|
/// <summary>
|
|
/// Number of bytes per unit within each hunk
|
|
/// </summary>
|
|
public uint UnitBytes { get; set; }
|
|
|
|
/// <summary>
|
|
/// Raw data SHA1
|
|
/// </summary>
|
|
public byte[] RawSHA1 { get; set; } = new byte[20];
|
|
|
|
/// <summary>
|
|
/// Combined raw+meta SHA1
|
|
/// </summary>
|
|
public byte[] SHA1 { get; set; } = new byte[20];
|
|
|
|
/// <summary>
|
|
/// Combined raw+meta SHA1 of parent
|
|
/// </summary>
|
|
public byte[] ParentSHA1 { get; set; } = new byte[20];
|
|
}
|
|
}
|