2025-09-26 10:57:15 -04:00
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
2025-09-26 13:06:18 -04:00
|
|
|
namespace SabreTools.Data.Models.LZ
|
2025-09-26 10:57:15 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// LZ variant with variable compression
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <see href="https://www.cabextract.org.uk/libmspack/doc/szdd_kwaj_format.html"/>
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
|
|
|
|
public sealed class KWAJHeader
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// "KWAJ" signature
|
|
|
|
|
/// </summary>
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
|
2025-10-30 20:44:16 -04:00
|
|
|
public byte[] Magic = new byte[8];
|
2025-09-26 10:57:15 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Compression method
|
|
|
|
|
/// </summary>
|
|
|
|
|
[MarshalAs(UnmanagedType.U2)]
|
|
|
|
|
public KWAJCompressionType CompressionType;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// File offset of compressed data
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ushort DataOffset;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Header flags to mark header extensions
|
|
|
|
|
/// </summary>
|
|
|
|
|
[MarshalAs(UnmanagedType.U2)]
|
|
|
|
|
public KWAJHeaderFlags HeaderFlags;
|
|
|
|
|
}
|
2025-10-30 20:44:16 -04:00
|
|
|
}
|