mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 23:05:12 +00:00
Add Spoon Installer models and notes
This commit is contained in:
40
SabreTools.Serialization/Models/SpoonInstaller/FileEntry.cs
Normal file
40
SabreTools.Serialization/Models/SpoonInstaller/FileEntry.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace SabreTools.Data.Models.SpoonInstaller
|
||||
{
|
||||
/// <summary>
|
||||
/// Single entry in the file table
|
||||
/// </summary>
|
||||
/// <remarks>Entry data is BZ2-compressed</remarks>
|
||||
public class FileEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// File offset relative to the start of the file
|
||||
/// </summary>
|
||||
public uint FileOffset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Compressed size of the entry
|
||||
/// </summary>
|
||||
/// <remarks>Includes headers</remarks>
|
||||
public uint CompressedSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Uncompressed size of the entry
|
||||
/// </summary>
|
||||
public uint UncompressedSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CRC-32(?)
|
||||
/// </summary>
|
||||
public uint Crc32 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Length of <see cref="Filename"/>
|
||||
/// </summary>
|
||||
public byte FilenameLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ASCII filename
|
||||
/// </summary>
|
||||
public string? Filename { get; set; }
|
||||
}
|
||||
}
|
||||
55
SabreTools.Serialization/Models/SpoonInstaller/Footer.cs
Normal file
55
SabreTools.Serialization/Models/SpoonInstaller/Footer.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
namespace SabreTools.Data.Models.SpoonInstaller
|
||||
{
|
||||
/// <summary>
|
||||
/// Structure similar to the end of central directory
|
||||
/// header in PKZIP files
|
||||
/// </summary>
|
||||
public class Footer
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Observed values:
|
||||
/// - 81 83 DA 2F
|
||||
/// </remarks>
|
||||
public uint Unknown0 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Observed values:
|
||||
/// - 6A 00 00 00
|
||||
/// </remarks>
|
||||
public uint Unknown1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset of the start of the file table
|
||||
/// </summary>
|
||||
public uint TablePointer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of entries that preceed the footer
|
||||
/// </summary>
|
||||
public uint EntryCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Observed values:
|
||||
/// - 83 52 34 03
|
||||
/// </remarks>
|
||||
public uint Unknown2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown, signature?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Observed values:
|
||||
/// - 43 F3 FF 0E
|
||||
/// </remarks>
|
||||
public uint Unknown3 { get; set; }
|
||||
}
|
||||
}
|
||||
28
SabreTools.Serialization/Models/SpoonInstaller/SFX.cs
Normal file
28
SabreTools.Serialization/Models/SpoonInstaller/SFX.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace SabreTools.Data.Models.SpoonInstaller
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the structure at the end of a Spoon Installer
|
||||
/// SFX file. These SFX files store all files bz2-compressed
|
||||
/// sequentially in the overlay of an executable.
|
||||
///
|
||||
/// The design is similar to the end of central directory
|
||||
/// in a PKZIP file. The footer needs to be read before
|
||||
/// the entry table as both the pointer to the start of
|
||||
/// the table as well as the entry count are included there.
|
||||
///
|
||||
/// The layout of this is derived from the layout in the
|
||||
/// physical file.
|
||||
/// </summary>
|
||||
public class SFX
|
||||
{
|
||||
/// <summary>
|
||||
/// Set of file entries
|
||||
/// </summary>
|
||||
public FileEntry[]? Entries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Footer representing the central directory
|
||||
/// </summary>
|
||||
public Footer? Footer { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user