Files
SabreTools.Serialization/SabreTools.Data.Models/MoPaQ/PatchInfo.cs
Matt Nadareski 7689c6dd07 Libraries
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.
2026-03-21 16:26:56 -04:00

43 lines
1.2 KiB
C#

using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.MoPaQ
{
/// <summary>
/// This structure contains size of the patch, flags and also MD5 of the patch.
/// </summary>
/// <see href="http://zezula.net/en/mpq/mpqformat.html"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class PatchInfo
{
/// <summary>
/// Length of patch info header, in bytes
/// </summary>
public uint Length;
/// <summary>
/// Flags. 0x80000000 = MD5 (?)
/// </summary>
public uint Flags;
/// <summary>
/// Uncompressed size of the patch file
/// </summary>
public uint DataSize;
/// <summary>
/// MD5 of the entire patch file after decompression
/// </summary>
/// <remarks>0x10 bytes</remarks>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x10)]
public byte[] MD5 = new byte[0x10];
/// <summary>
/// The sector offset table (variable length)
/// </summary>
/// <remarks>0 entries</remarks>
/// TODO: Determine the number of entries
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0)]
public uint[] SectorOffsetTable = [];
}
}