Files
SabreTools.Models/XZP/Header.cs

33 lines
784 B
C#
Raw Permalink Normal View History

2024-04-23 15:49:41 -04:00
using System.Runtime.InteropServices;
2023-09-04 00:12:49 -04:00
namespace SabreTools.Models.XZP
2023-09-04 00:11:04 -04:00
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/XZPFile.h"/>
2024-04-23 15:49:41 -04:00
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
2023-09-04 00:11:04 -04:00
public sealed class Header
{
2024-04-23 15:49:41 -04:00
/// <summary>
/// "piZx"
/// </summary>
/// <remarks>4 bytes</remarks>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
public string? Signature;
2023-09-04 00:11:04 -04:00
2024-04-23 15:49:41 -04:00
public uint Version;
2023-09-04 00:11:04 -04:00
2024-04-23 15:49:41 -04:00
public uint PreloadDirectoryEntryCount;
2023-09-04 00:11:04 -04:00
2024-04-23 15:49:41 -04:00
public uint DirectoryEntryCount;
2023-09-04 00:11:04 -04:00
2024-04-23 15:49:41 -04:00
public uint PreloadBytes;
2023-09-04 00:11:04 -04:00
2024-04-23 15:49:41 -04:00
public uint HeaderLength;
2023-09-04 00:11:04 -04:00
2024-04-23 15:49:41 -04:00
public uint DirectoryItemCount;
2023-09-04 00:11:04 -04:00
2024-04-23 15:49:41 -04:00
public uint DirectoryItemOffset;
2023-09-04 00:11:04 -04:00
2024-04-23 15:49:41 -04:00
public uint DirectoryItemLength;
2023-09-04 00:11:04 -04:00
}
}