20 Commits

Author SHA1 Message Date
Matt Nadareski
8f78c73c6f Fix publish scripts 2024-04-23 14:12:10 -04:00
Matt Nadareski
af4ff3d383 Bump version 2024-04-23 14:10:58 -04:00
Matt Nadareski
3e638a5c57 Make Linux publish script executable 2024-04-23 14:10:27 -04:00
Matt Nadareski
638d0226c1 Add publish scripts 2024-04-23 14:10:03 -04:00
Matt Nadareski
07c6d5b43a Obsolete is not an error... for now 2024-04-23 13:38:37 -04:00
Matt Nadareski
108e63a099 Add some null-terminated type flags 2024-04-23 13:36:24 -04:00
Matt Nadareski
c636d3252b Migrate many models to StructLayout 2024-04-23 13:30:43 -04:00
Matt Nadareski
b19dbf2254 Update APPNOTE link, add more Header IDs 2024-04-17 16:43:02 -04:00
Matt Nadareski
111b84170c Add relevant information to PKZIP archive 2024-04-17 16:09:30 -04:00
Matt Nadareski
2d7df0d4fb Add PKZIP archive model 2024-04-17 15:59:56 -04:00
Matt Nadareski
aba02663e5 Start adding PKZIP models 2024-04-17 15:47:41 -04:00
Matt Nadareski
594fec923a Bump version 2024-04-03 22:44:18 -04:00
Deterous
b5cf4e870d Add fields for v1.0 catalog.js files (#6) 2024-04-03 19:43:17 -07:00
Matt Nadareski
e6976796c2 Initial attempt at Delphi models 2024-04-02 10:58:20 -04:00
Deterous
295d8c7612 XboxOne/XboxSX catalog.js Model (#5)
* XboxOne catalog.js model

* Split Catalog object, bump version

* Minor fixes

* Custom JsonConverter for launchPackage

* Make launchPackage an abstract object

* Don't ignore packages

* Fix field types for Catalog/Package
2024-04-02 07:54:57 -07:00
Matt Nadareski
4dd184583c Revert XML tag for OfflineList duplicate ID 2024-03-19 15:30:45 -04:00
Matt Nadareski
081c9c9245 Bump version 2024-03-12 16:21:06 -04:00
Matt Nadareski
b974380ccf Fix SoftwareList.Disk field name 2024-03-12 15:28:58 -04:00
Matt Nadareski
41ed2cbc9a Fix XML element name for duplicateId 2024-03-12 00:07:47 -04:00
Matt Nadareski
2cfcb49e35 Fix missing OfflineList field 2024-03-11 23:35:22 -04:00
141 changed files with 3026 additions and 655 deletions

View File

@@ -1,13 +1,17 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.AACS
{
/// <summary>
/// This record type is undocumented but found in real media key blocks
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public sealed class CopyrightRecord : Record
{
/// <summary>
/// Null-terminated ASCII string representing the copyright
/// </summary>
public string? Copyright { get; set; }
[MarshalAs(UnmanagedType.LPStr)]
public string? Copyright;
}
}

View File

@@ -1,6 +1,9 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.AACS
{
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DriveRevocationListEntry
{
/// <summary>
@@ -9,13 +12,14 @@ namespace SabreTools.Models.AACS
/// field indicates that only one ID is being revoked, a value of one
/// in the Range field indicates two IDs are being revoked, and so on.
/// </summary>
public ushort Range { get; set; }
public ushort Range;
/// <summary>
/// A 6-byte Drive ID value identifying the Licensed Drive being revoked
/// (or the first in a range of Licensed Drives being revoked, in the
/// case of a non-zero Range value).
/// </summary>
public byte[]? DriveID { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
public byte[]? DriveID;
}
}

View File

@@ -1,6 +1,9 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.AACS
{
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class HostRevocationListEntry
{
/// <summary>
@@ -9,13 +12,14 @@ namespace SabreTools.Models.AACS
/// field indicates that only one ID is being revoked, a value of one
/// in the Range field indicates two IDs are being revoked, and so on.
/// </summary>
public ushort Range { get; set; }
public ushort Range;
/// <summary>
/// A 6-byte Host ID value identifying the host being revoked (or the
/// first in a range of hosts being revoked, in the case of a non-zero
/// Range value).
/// </summary>
public byte[]? HostID { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
public byte[]? HostID;
}
}

View File

@@ -1,6 +1,9 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.AACS
{
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class SubsetDifference
{
/// <summary>
@@ -9,12 +12,12 @@ namespace SabreTools.Models.AACS
/// the mask. For example, the value 0x01 denotes a mask of
/// 0xFFFFFFFE; value 0x0A denotes a mask of 0xFFFFFC00.
/// </summary>
public byte Mask { get; set; }
public byte Mask;
/// <summary>
/// The last 4 bytes are the uv number, most significant
/// byte first.
/// </summary>
public uint Number { get; set; }
public uint Number;
}
}

View File

@@ -1,24 +1,28 @@
namespace SabreTools.Models.BFPK
using System.Runtime.InteropServices;
namespace SabreTools.Models.BFPK
{
/// <summary>
/// Header
/// </summary>
/// <see cref="https://forum.xentax.com/viewtopic.php?t=5102"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class Header
{
/// <summary>
/// "BFPK"
/// </summary>
public string? Magic { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
public string? Magic;
/// <summary>
/// Version
/// </summary>
public int Version { get; set; }
public int Version;
/// <summary>
/// Files
/// </summary>
public int Files { get; set; }
public int Files;
}
}

View File

@@ -1,3 +1,5 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.BMP
{
/// <summary>
@@ -5,31 +7,32 @@ namespace SabreTools.Models.BMP
/// and layout of a file that contains a DIB.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapfileheader"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class BITMAPFILEHEADER
{
/// <summary>
/// The file type; must be BM.
/// </summary>
public ushort Type { get; set; }
public ushort Type;
/// <summary>
/// The size, in bytes, of the bitmap file.
/// </summary>
public uint Size { get; set; }
public uint Size;
/// <summary>
/// Reserved; must be zero.
/// </summary>
public ushort Reserved1 { get; set; }
public ushort Reserved1;
/// <summary>
/// Reserved; must be zero.
/// </summary>
public ushort Reserved2 { get; set; }
public ushort Reserved2;
/// <summary>
/// The offset, in bytes, from the beginning of the BITMAPFILEHEADER structure to the bitmap bits.
/// </summary>
public uint OffBits { get; set; }
public uint OffBits;
}
}

View File

@@ -1,9 +1,12 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.BMP
{
/// <summary>
/// The BITMAPINFOHEADER structure contains information about the dimensions and
/// color format of a device-independent bitmap (DIB).
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public sealed class BITMAPINFOHEADER
{
/// <summary>
@@ -11,12 +14,12 @@ namespace SabreTools.Models.BMP
/// not include the size of the color table or the size of the color masks,
/// if they are appended to the end of structure.
/// </summary>
public uint Size { get; set; }
public uint Size;
/// <summary>
/// Specifies the width of the bitmap, in pixels.
/// </summary>
public int Width { get; set; }
public int Width;
/// <summary>
/// Specifies the height of the bitmap, in pixels.
@@ -30,19 +33,19 @@ namespace SabreTools.Models.BMP
/// or negative biHeight.
/// - For compressed formats, biHeight must be positive, regardless of image orientation.
/// </summary>
public int Height { get; set; }
public int Height;
/// <summary>
/// Specifies the number of planes for the target device. This value must be set to 1.
/// </summary>
public ushort Planes { get; set; }
public ushort Planes;
/// <summary>
/// Specifies the number of bits per pixel (bpp). For uncompressed formats, this value
/// is the average number of bits per pixel. For compressed formats, this value is the
/// implied bit depth of the uncompressed image, after the image has been decoded.
/// </summary>
public ushort BitCount { get; set; }
public ushort BitCount;
/// <summary>
/// For compressed video and YUV formats, this member is a FOURCC code, specified as a
@@ -59,36 +62,36 @@ namespace SabreTools.Models.BMP
/// If biCompression equals BI_BITFIELDS, the format is either RGB 555 or RGB 565. Use
/// the subtype GUID in the AM_MEDIA_TYPE structure to determine the specific RGB type.
/// </summary>
public uint Compression { get; set; }
public uint Compression;
/// <summary>
/// Specifies the size, in bytes, of the image. This can be set to 0 for uncompressed
/// RGB bitmaps.
/// </summary>
public uint SizeImage { get; set; }
public uint SizeImage;
/// <summary>
/// Specifies the horizontal resolution, in pixels per meter, of the target device for
/// the bitmap.
/// </summary>
public int XPelsPerMeter { get; set; }
public int XPelsPerMeter;
/// <summary>
/// Specifies the vertical resolution, in pixels per meter, of the target device for
/// the bitmap.
/// </summary>
public int YPelsPerMeter { get; set; }
public int YPelsPerMeter;
/// <summary>
/// Specifies the number of color indices in the color table that are actually used by
/// the bitmap.
/// </summary>
public uint ClrUsed { get; set; }
public uint ClrUsed;
/// <summary>
/// Specifies the number of color indices that are considered important for displaying
/// the bitmap. If this value is zero, all colors are important.
/// </summary>
public uint ClrImportant { get; set; }
public uint ClrImportant;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.BSP
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/BSPFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class Header
{
/// <summary>
/// Version
/// </summary>
public uint Version { get; set; }
public uint Version;
}
}

View File

@@ -1,16 +1,19 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.BSP
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/BSPFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class Lump
{
/// <summary>
/// Offset
/// </summary>
public uint Offset { get; set; }
public uint Offset;
/// <summary>
/// Length
/// </summary>
public uint Length { get; set; }
public uint Length;
}
}

View File

@@ -1,17 +1,22 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.Compression.LZ
{
/// <summary>
/// Format of first 14 byte of LZ compressed file
/// </summary>
/// <see href="https://github.com/wine-mirror/wine/blob/master/dlls/kernel32/lzexpand.c"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class FileHeaader
{
public string? Magic { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
public string? Magic;
public byte CompressionType { get; set; }
public byte CompressionType;
public char LastChar { get; set; }
[MarshalAs(UnmanagedType.U1)]
public char LastChar;
public uint RealLength { get; set; }
public uint RealLength;
}
}

View File

@@ -1,31 +1,34 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.DVD
{
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo.html"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class CellAddressTableEntry
{
/// <summary>
/// VOBidn
/// </summary>
public ushort VOBIdentity { get; set; }
public ushort VOBIdentity;
/// <summary>
/// CELLidn
/// </summary>
public byte CellIdentity { get; set; }
public byte CellIdentity;
/// <summary>
/// Reserved
/// </summary>
public byte Reserved { get; set; }
public byte Reserved;
/// <summary>
/// Starting sector within VOB
/// </summary>
public uint StartingSectorWithinVOB { get; set; }
public uint StartingSectorWithinVOB;
/// <summary>
/// Ending sector within VOB
/// </summary>
public uint EndingSectorWithinVOB { get; set; }
public uint EndingSectorWithinVOB;
}
}

View File

@@ -1,26 +1,29 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.DVD
{
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class LanguageUnitTableEntry
{
/// <summary>
/// ISO639 language code
/// </summary>
public ushort ISO639LanguageCode { get; set; }
public ushort ISO639LanguageCode;
/// <summary>
/// Reserved for language code extension
/// </summary>
public byte Reserved { get; set; }
public byte Reserved;
/// <summary>
/// Menu existence flag [80 = title]
/// </summary>
public byte MenuExistenceFlag { get; set; }
public byte MenuExistenceFlag;
/// <summary>
/// Offset to VMGM_LU, relative to VMGM_PGCI_UT
/// </summary>
public uint LanguageUnitOffset { get; set; }
public uint LanguageUnitOffset;
}
}

View File

@@ -1,21 +1,24 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.DVD
{
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ParentalManagementMasksTableEntry
{
/// <summary>
/// Country code
/// </summary>
public ushort CountryCode { get; set; }
public ushort CountryCode;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved { get; set; }
public ushort Reserved;
/// <summary>
/// Offset to PTL_MAIT
/// </summary>
public uint Offset { get; set; }
public uint Offset;
}
}

View File

@@ -11,7 +11,7 @@ namespace SabreTools.Models.DVD
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved { get; set; }
public ushort Reserved { get; set; }
/// <summary>
/// End address (last byte of last PGC in this LU)

View File

@@ -1,26 +1,30 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.DVD
{
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ProgramChainTableEntry
{
/// <summary>
/// PGC category
/// </summary>
public ProgramChainCategory Category { get; set; }
[MarshalAs(UnmanagedType.U1)]
public ProgramChainCategory Category;
/// <summary>
/// Unknown
/// </summary>
public byte Unknown { get; set; }
public byte Unknown;
/// <summary>
/// Parental management mask
/// </summary>
public ushort ParentalManagementMask { get; set; }
public ushort ParentalManagementMask;
/// <summary>
/// Offset to VMGM_PGC, relative to VMGM_LU
/// </summary>
public uint Offset { get; set; }
public uint Offset;
}
}

View File

@@ -11,7 +11,7 @@ namespace SabreTools.Models.DVD
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved { get; set; }
public ushort Reserved { get; set; }
/// <summary>
/// End address (last byte of last entry)

View File

@@ -1,42 +1,46 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.DVD
{
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class TitlesTableEntry
{
/// <summary>
/// Title type
/// </summary>
public TitleType TitleType { get; set; }
[MarshalAs(UnmanagedType.U1)]
public TitleType TitleType;
/// <summary>
/// Number of angles
/// </summary>
public byte NumberOfAngles { get; set; }
public byte NumberOfAngles;
/// <summary>
/// Number of chapters (PTTs)
/// </summary>
public ushort NumberOfChapters { get; set; }
public ushort NumberOfChapters;
/// <summary>
/// Parental management mask
/// </summary>
public ushort ParentalManagementMask { get; set; }
public ushort ParentalManagementMask;
/// <summary>
/// Video Title Set number (VTSN)
/// </summary>
public byte VideoTitleSetNumber { get; set; }
public byte VideoTitleSetNumber;
/// <summary>
/// Title number within VTS (VTS_TTN)
/// </summary>
public byte TitleNumberWithinVTS { get; set; }
public byte TitleNumberWithinVTS;
/// <summary>
/// Start sector for VTS, referenced to whole disk
/// (video_ts.ifo starts at sector 00000000)
/// </summary>
public uint VTSStartSector { get; set; }
public uint VTSStartSector;
}
}

View File

@@ -1,22 +1,27 @@
using System.Drawing;
using System.Runtime.InteropServices;
namespace SabreTools.Models.DVD
{
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo.html"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class VideoManagerIFO
{
/// <summary>
/// "DVDVIDEO-VMG"
/// </summary>
public string? Signature { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 12)]
public string? Signature;
/// <summary>
/// Last sector of VMG set (last sector of BUP)
/// </summary>
public uint LastVMGSetSector { get; set; }
public uint LastVMGSetSector;
/// <summary>
/// Last sector of IFO
/// </summary>
public uint LastIFOSector { get; set; }
public uint LastIFOSector;
/// <summary>
/// Version number
@@ -24,127 +29,132 @@ namespace SabreTools.Models.DVD
/// - Byte 1, Bits 7-4 - Major version number
/// - Byte 1, Bits 3-0 - Minor version number
/// </summary>
public ushort VersionNumber { get; set; }
public ushort VersionNumber;
/// <summary>
/// VMG category
/// </summary>
/// <remarks>byte1=prohibited region mask</remarks>
public uint VMGCategory { get; set; }
public uint VMGCategory;
/// <summary>
/// Number of volumes
/// </summary>
public ushort NumberOfVolumes { get; set; }
public ushort NumberOfVolumes;
/// <summary>
/// Volume number
/// </summary>
public ushort VolumeNumber { get; set; }
public ushort VolumeNumber;
/// <summary>
/// Side ID
/// </summary>
public byte SideID { get; set; }
public byte SideID;
/// <summary>
/// Number of title sets
/// </summary>
public ushort NumberOfTitleSets { get; set; }
public ushort NumberOfTitleSets;
/// <summary>
/// Provider ID
/// </summary>
public byte[]? ProviderID { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[]? ProviderID;
/// <summary>
/// VMG POS
/// </summary>
public ulong VMGPOS { get; set; }
public ulong VMGPOS;
/// <summary>
/// End byte address of VMGI_MAT
/// </summary>
public uint InformationManagementTableEndByteAddress { get; set; }
public uint InformationManagementTableEndByteAddress;
/// <summary>
/// Start address of FP_PGC (First Play program chain)
/// </summary>
public uint FirstPlayProgramChainStartAddress { get; set; }
public uint FirstPlayProgramChainStartAddress;
/// <summary>
/// Start sector of Menu VOB
/// </summary>
public uint MenuVOBStartSector { get; set; }
public uint MenuVOBStartSector;
/// <summary>
/// Sector pointer to TT_SRPT (table of titles)
/// </summary>
public uint TableOfTitlesSectorPointer { get; set; }
public uint TableOfTitlesSectorPointer;
/// <summary>
/// Sector pointer to VMGM_PGCI_UT (Menu Program Chain table)
/// </summary>
public uint MenuProgramChainTableSectorPointer { get; set; }
public uint MenuProgramChainTableSectorPointer;
/// <summary>
/// Sector pointer to VMG_PTL_MAIT (Parental Management masks)
/// </summary>
public uint ParentalManagementMasksSectorPointer { get; set; }
public uint ParentalManagementMasksSectorPointer;
/// <summary>
/// Sector pointer to VMG_VTS_ATRT (copies of VTS audio/sub-picture attributes)
/// </summary>
public uint AudioSubPictureAttributesSectorPointer { get; set; }
public uint AudioSubPictureAttributesSectorPointer;
/// <summary>
/// Sector pointer to VMG_TXTDT_MG (text data)
/// </summary>
public uint TextDataSectorPointer { get; set; }
public uint TextDataSectorPointer;
/// <summary>
/// Sector pointer to VMGM_C_ADT (menu cell address table)
/// </summary>
public uint MenuCellAddressTableSectorPointer { get; set; }
public uint MenuCellAddressTableSectorPointer;
/// <summary>
/// Sector pointer to VMGM_VOBU_ADMAP (menu VOBU address map)
/// </summary>
public uint MenuVOBUAddressMapSectorPointer { get; set; }
public uint MenuVOBUAddressMapSectorPointer;
/// <summary>
/// Video attributes of VMGM_VOBS
/// </summary>
public byte[]? VideoAttributes { get; set; }
public ushort VideoAttributes;
/// <summary>
/// Number of audio streams in VMGM_VOBS
/// </summary>
public ushort NumberOfAudioStreams { get; set; }
public ushort NumberOfAudioStreams;
/// <summary>
/// Audio attributes of VMGM_VOBS
/// </summary>
public byte[][]? AudioAttributes { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public ulong[]? AudioAttributes;
/// <summary>
/// Unknown
/// </summary>
public byte[]? Unknown { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[]? Unknown;
/// <summary>
/// Number of subpicture streams in VMGM_VOBS (0 or 1)
/// </summary>
public ushort NumberOfSubpictureStreams { get; set; }
public ushort NumberOfSubpictureStreams;
/// <summary>
/// Subpicture attributes of VMGM_VOBS
/// </summary>
public byte[]? SubpictureAttributes { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
public byte[]? SubpictureAttributes;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 164)]
public byte[]? Reserved;
}
}

View File

@@ -1,22 +1,26 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.DVD
{
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo.html"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class VideoTitleSetIFO
{
/// <summary>
/// "DVDVIDEO-VTS"
/// </summary>
public string? Signature { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 12)]
public string? Signature;
/// <summary>
/// Last sector of title set (last sector of BUP)
/// </summary>
public uint LastTitleSetSector { get; set; }
public uint LastTitleSetSector;
/// <summary>
/// Last sector of IFO
/// </summary>
public uint LastIFOSector { get; set; }
public uint LastIFOSector;
/// <summary>
/// Version number
@@ -24,137 +28,142 @@ namespace SabreTools.Models.DVD
/// - Byte 1, Bits 7-4 - Major version number
/// - Byte 1, Bits 3-0 - Minor version number
/// </summary>
public ushort VersionNumber { get; set; }
public ushort VersionNumber;
/// <summary>
/// VTS category
/// </summary>
/// <remarks>0=unspecified, 1=Karaoke</remarks>
public uint VMGCategory { get; set; }
public uint VMGCategory;
/// <summary>
/// Number of volumes
/// </summary>
public ushort NumberOfVolumes { get; set; }
public ushort NumberOfVolumes;
/// <summary>
/// Volume number
/// </summary>
public ushort VolumeNumber { get; set; }
public ushort VolumeNumber;
/// <summary>
/// Side ID
/// </summary>
public byte SideID { get; set; }
public byte SideID;
/// <summary>
/// Number of title sets
/// </summary>
public ushort NumberOfTitleSets { get; set; }
public ushort NumberOfTitleSets;
/// <summary>
/// Provider ID
/// </summary>
public byte[]? ProviderID { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[]? ProviderID;
/// <summary>
/// VMG POS
/// </summary>
public ulong VMGPOS { get; set; }
public ulong VMGPOS;
/// <summary>
/// End byte address of VTS_MAT
/// </summary>
public uint InformationManagementTableEndByteAddress { get; set; }
public uint InformationManagementTableEndByteAddress;
/// <summary>
/// Start address of FP_PGC (First Play program chain)
/// </summary>
public uint FirstPlayProgramChainStartAddress { get; set; }
public uint FirstPlayProgramChainStartAddress;
/// <summary>
/// Start sector of Menu VOB
/// </summary>
public uint MenuVOBStartSector { get; set; }
public uint MenuVOBStartSector;
/// <summary>
/// Start sector of Title VOB
/// </summary>
public uint TitleVOBStartSector { get; set; }
public uint TitleVOBStartSector;
/// <summary>
/// Sector pointer to VTS_PTT_SRPT (table of Titles and Chapters)
/// </summary>
public uint TableOfTitlesAndChaptersSectorPointer { get; set; }
public uint TableOfTitlesAndChaptersSectorPointer;
/// <summary>
/// Sector pointer to VTS_PGCI (Title Program Chain table)
/// </summary>
public uint TitleProgramChainTableSectorPointer { get; set; }
public uint TitleProgramChainTableSectorPointer;
/// <summary>
/// Sector pointer to VTSM_PGCI_UT (Menu Program Chain table)
/// </summary>
public uint MenuProgramChainTableSectorPointer { get; set; }
public uint MenuProgramChainTableSectorPointer;
/// <summary>
/// Sector pointer to VTS_TMAPTI (time map)
/// </summary>
public uint TimeMapSectorPointer { get; set; }
public uint TimeMapSectorPointer;
/// <summary>
/// Sector pointer to VTSM_C_ADT (menu cell address table)
/// </summary>
public uint MenuCellAddressTableSectorPointer { get; set; }
public uint MenuCellAddressTableSectorPointer;
/// <summary>
/// Sector pointer to VTSM_VOBU_ADMAP (menu VOBU address map)
/// </summary>
public uint MenuVOBUAddressMapSectorPointer { get; set; }
public uint MenuVOBUAddressMapSectorPointer;
/// <summary>
/// Sector pointer to VTS_C_ADT (title set cell address table)
/// </summary>
public uint TitleSetCellAddressTableSectorPointer { get; set; }
public uint TitleSetCellAddressTableSectorPointer;
/// <summary>
/// Sector pointer to VTS_VOBU_ADMAP (title set VOBU address map)
/// </summary>
public uint TitleSetVOBUAddressMapSectorPointer { get; set; }
public uint TitleSetVOBUAddressMapSectorPointer;
/// <summary>
/// Video attributes of VTSM_VOBS
/// </summary>
public byte[]? VideoAttributes { get; set; }
public ushort VideoAttributes;
/// <summary>
/// Number of audio streams in VTSM_VOBS
/// </summary>
public ushort NumberOfAudioStreams { get; set; }
public ushort NumberOfAudioStreams;
/// <summary>
/// Audio attributes of VTSM_VOBS
/// </summary>
public byte[][]? AudioAttributes { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public ulong[]? AudioAttributes;
/// <summary>
/// Unknown
/// </summary>
public byte[]? Unknown { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[]? Unknown;
/// <summary>
/// Number of subpicture streams in VTSM_VOBS (0 or 1)
/// </summary>
public ushort NumberOfSubpictureStreams { get; set; }
public ushort NumberOfSubpictureStreams;
/// <summary>
/// Subpicture attributes of VTSM_VOBS
/// </summary>
public byte[]? SubpictureAttributes { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
public byte[]? SubpictureAttributes;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 164)]
public byte[]? Reserved;
}
}

14
Delphi/Constants.cs Normal file
View File

@@ -0,0 +1,14 @@
/// <remarks>
/// Information sourced from https://stackoverflow.com/questions/18720045/what-are-the-list-of-all-possible-values-for-dvclal
/// </remarks>
namespace SabreTools.Models.Delphi
{
public static class Constants
{
public static readonly byte[] DVCLALStandard = [0x23, 0x78, 0x5D, 0x23, 0xB6, 0xA5, 0xF3, 0x19, 0x43, 0xF3, 0x40, 0x02, 0x26, 0xD1, 0x11, 0xC7];
public static readonly byte[] DVCLALProfessional = [0xA2, 0x8C, 0xDF, 0x98, 0x7B, 0x3C, 0x3A, 0x79, 0x26, 0x71, 0x3F, 0x09, 0x0F, 0x2A, 0x25, 0x17];
public static readonly byte[] DVCLALEnterprise = [0x26, 0x3D, 0x4F, 0x38, 0xC2, 0x82, 0x37, 0xB8, 0xF3, 0x24, 0x42, 0x03, 0x17, 0x9B, 0x3A, 0x83];
}
}

View File

@@ -0,0 +1,14 @@
/// <remarks>
/// Information sourced from https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.PackageInfoTable
/// </remarks>
namespace SabreTools.Models.Delphi
{
public class PackageInfoTable
{
public int UnitCount { get; set; }
public PackageUnitEntry[]? UnitInfo { get; set; }
public PackageTypeInfo? TypeInfo { get; set; }
}
}

19
Delphi/PackageTypeInfo.cs Normal file
View File

@@ -0,0 +1,19 @@
/// <remarks>
/// Information sourced from https://docwiki.embarcadero.com/Libraries/Sydney/en/System.TPackageTypeInfo
/// </remarks>
namespace SabreTools.Models.Delphi
{
public class PackageTypeInfo
{
public int TypeCount { get; set; }
/// <remarks>
/// System-dependent pointer type, assumed to be encoded for x86
/// </remarks>
public uint[]? TypeTable { get; set; }
public int UnitCount { get; set; }
public string[]? UnitNames { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using System.Runtime.InteropServices;
/// <remarks>
/// Information sourced from https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.PackageUnitEntry
/// </remarks>
namespace SabreTools.Models.Delphi
{
[StructLayout(LayoutKind.Sequential)]
public class PackageUnitEntry
{
/// <remarks>
/// System-dependent pointer type, assumed to be encoded for x86
/// </remarks>
public uint Init;
/// <remarks>
/// System-dependent pointer type, assumed to be encoded for x86
/// </remarks>
public uint FInit;
}
}

View File

@@ -1,41 +1,44 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class BlockEntry
{
/// <summary>
/// Flags for the block entry. 0x200F0000 == Not used.
/// </summary>
public uint EntryFlags { get; set; }
public uint EntryFlags;
/// <summary>
/// The offset for the data contained in this block entry in the file.
/// </summary>
public uint FileDataOffset { get; set; }
public uint FileDataOffset;
/// <summary>
/// The length of the data in this block entry.
/// </summary>
public uint FileDataSize { get; set; }
public uint FileDataSize;
/// <summary>
/// The offset to the first data block of this block entry's data.
/// </summary>
public uint FirstDataBlockIndex { get; set; }
public uint FirstDataBlockIndex;
/// <summary>
/// The next block entry in the series. (N/A if == BlockCount.)
/// </summary>
public uint NextBlockEntryIndex { get; set; }
public uint NextBlockEntryIndex;
/// <summary>
/// The previous block entry in the series. (N/A if == BlockCount.)
/// </summary>
public uint PreviousBlockEntryIndex { get; set; }
public uint PreviousBlockEntryIndex;
/// <summary>
/// The offset of the block entry in the directory.
/// </summary>
public uint DirectoryIndex { get; set; }
public uint DirectoryIndex;
}
}

View File

@@ -1,46 +1,49 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class BlockEntryHeader
{
/// <summary>
/// Number of data blocks.
/// </summary>
public uint BlockCount { get; set; }
public uint BlockCount;
/// <summary>
/// Number of data blocks that point to data.
/// </summary>
public uint BlocksUsed { get; set; }
public uint BlocksUsed;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy1 { get; set; }
public uint Dummy1;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy2 { get; set; }
public uint Dummy2;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy3 { get; set; }
public uint Dummy3;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy4 { get; set; }
public uint Dummy4;
/// <summary>
/// Header checksum.
/// </summary>
public uint Checksum { get; set; }
public uint Checksum;
}
}

View File

@@ -1,19 +1,22 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <remarks>
/// Part of version 5 but not version 6.
/// </remarks>
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class BlockEntryMap
{
/// <summary>
/// The previous block entry. (N/A if == BlockCount.)
/// </summary>
public uint PreviousBlockEntryIndex { get; set; }
public uint PreviousBlockEntryIndex;
/// <summary>
/// The next block entry. (N/A if == BlockCount.)
/// </summary>
public uint NextBlockEntryIndex { get; set; }
public uint NextBlockEntryIndex;
}
}

View File

@@ -1,34 +1,37 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <remarks>
/// Part of version 5 but not version 6.
/// </remarks>
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class BlockEntryMapHeader
{
/// <summary>
/// Number of data blocks.
/// </summary>
public uint BlockCount { get; set; }
public uint BlockCount;
/// <summary>
/// Index of the first block entry.
/// </summary>
public uint FirstBlockEntryIndex { get; set; }
public uint FirstBlockEntryIndex;
/// <summary>
/// Index of the last block entry.
/// </summary>
public uint LastBlockEntryIndex { get; set; }
public uint LastBlockEntryIndex;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Header checksum.
/// </summary>
public uint Checksum { get; set; }
public uint Checksum;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ChecksumEntry
{
/// <summary>
/// Checksum.
/// </summary>
public uint Checksum { get; set; }
public uint Checksum;
}
}

View File

@@ -1,16 +1,19 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ChecksumHeader
{
/// <summary>
/// Always 0x00000001
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Size of LPGCFCHECKSUMHEADER & LPGCFCHECKSUMMAPHEADER & in bytes.
/// </summary>
public uint ChecksumSize { get; set; }
public uint ChecksumSize;
}
}

View File

@@ -1,16 +1,19 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ChecksumMapEntry
{
/// <summary>
/// Number of checksums.
/// </summary>
public uint ChecksumCount { get; set; }
public uint ChecksumCount;
/// <summary>
/// Index of first checksum.
/// </summary>
public uint FirstChecksumIndex { get; set; }
public uint FirstChecksumIndex;
}
}

View File

@@ -1,26 +1,29 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ChecksumMapHeader
{
/// <summary>
/// Always 0x14893721
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Always 0x00000001
/// </summary>
public uint Dummy1 { get; set; }
public uint Dummy1;
/// <summary>
/// Number of items.
/// </summary>
public uint ItemCount { get; set; }
public uint ItemCount;
/// <summary>
/// Number of checksums.
/// </summary>
public uint ChecksumCount { get; set; }
public uint ChecksumCount;
}
}

View File

@@ -1,36 +1,39 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DataBlockHeader
{
/// <summary>
/// GCF file version. This field is not part of all file versions.
/// </summary>
public uint LastVersionPlayed { get; set; }
public uint LastVersionPlayed;
/// <summary>
/// Number of data blocks.
/// </summary>
public uint BlockCount { get; set; }
public uint BlockCount;
/// <summary>
/// Size of each data block in bytes.
/// </summary>
public uint BlockSize { get; set; }
public uint BlockSize;
/// <summary>
/// Offset to first data block.
/// </summary>
public uint FirstBlockOffset { get; set; }
public uint FirstBlockOffset;
/// <summary>
/// Number of data blocks that contain data.
/// </summary>
public uint BlocksUsed { get; set; }
public uint BlocksUsed;
/// <summary>
/// Header checksum.
/// </summary>
public uint Checksum { get; set; }
public uint Checksum;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryCopyEntry
{
/// <summary>
/// Index of the directory item.
/// </summary>
public uint DirectoryIndex { get; set; }
public uint DirectoryIndex;
}
}

View File

@@ -1,76 +1,79 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryHeader
{
/// <summary>
/// Always 0x00000004
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Cache ID.
/// </summary>
public uint CacheID { get; set; }
public uint CacheID;
/// <summary>
/// GCF file version.
/// </summary>
public uint LastVersionPlayed { get; set; }
public uint LastVersionPlayed;
/// <summary>
/// Number of items in the directory.
/// </summary>
public uint ItemCount { get; set; }
public uint ItemCount;
/// <summary>
/// Number of files in the directory.
/// </summary>
public uint FileCount { get; set; }
public uint FileCount;
/// <summary>
/// Always 0x00008000. Data per checksum?
/// </summary>
public uint Dummy1 { get; set; }
public uint Dummy1;
/// <summary>
/// Size of lpGCFDirectoryEntries & lpGCFDirectoryNames & lpGCFDirectoryInfo1Entries & lpGCFDirectoryInfo2Entries & lpGCFDirectoryCopyEntries & lpGCFDirectoryLocalEntries in bytes.
/// </summary>
public uint DirectorySize { get; set; }
public uint DirectorySize;
/// <summary>
/// Size of the directory names in bytes.
/// </summary>
public uint NameSize { get; set; }
public uint NameSize;
/// <summary>
/// Number of Info1 entires.
/// </summary>
public uint Info1Count { get; set; }
public uint Info1Count;
/// <summary>
/// Number of files to copy.
/// </summary>
public uint CopyCount { get; set; }
public uint CopyCount;
/// <summary>
/// Number of files to keep local.
/// </summary>
public uint LocalCount { get; set; }
public uint LocalCount;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy2 { get; set; }
public uint Dummy2;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy3 { get; set; }
public uint Dummy3;
/// <summary>
/// Header checksum.
/// </summary>
public uint Checksum { get; set; }
public uint Checksum;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryInfo1Entry
{
/// <summary>
/// Reserved
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryInfo2Entry
{
/// <summary>
/// Reserved
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryLocalEntry
{
/// <summary>
/// Index of the directory item.
/// </summary>
public uint DirectoryIndex { get; set; }
public uint DirectoryIndex;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryMapEntry
{
/// <summary>
/// Index of the first data block. (N/A if == BlockCount.)
/// </summary>
public uint FirstBlockIndex { get; set; }
public uint FirstBlockIndex;
}
}

View File

@@ -1,19 +1,22 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <remarks>
/// Added in version 4 or version 5.
/// </remarks>
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryMapHeader
{
/// <summary>
/// Always 0x00000001
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Always 0x00000000
/// </summary>
public uint Dummy1 { get; set; }
public uint Dummy1;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class FragmentationMap
{
/// <summary>
/// The index of the next data block.
/// </summary>
public uint NextDataBlockIndex { get; set; }
public uint NextDataBlockIndex;
}
}

View File

@@ -1,26 +1,29 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class FragmentationMapHeader
{
/// <summary>
/// Number of data blocks.
/// </summary>
public uint BlockCount { get; set; }
public uint BlockCount;
/// <summary>
/// The index of the first unused fragmentation map entry.
/// </summary>
public uint FirstUnusedEntry { get; set; }
public uint FirstUnusedEntry;
/// <summary>
/// The block entry terminator; 0 = 0x0000ffff or 1 = 0xffffffff.
/// </summary>
public uint Terminator { get; set; }
public uint Terminator;
/// <summary>
/// Header checksum.
/// </summary>
public uint Checksum { get; set; }
public uint Checksum;
}
}

View File

@@ -1,61 +1,64 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.GCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/GCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class Header
{
/// <summary>
/// Always 0x00000001
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Always 0x00000001
/// </summary>
public uint MajorVersion { get; set; }
public uint MajorVersion;
/// <summary>
/// GCF version number.
/// </summary>
public uint MinorVersion { get; set; }
public uint MinorVersion;
/// <summary>
/// Cache ID
/// </summary>
public uint CacheID { get; set; }
public uint CacheID;
/// <summary>
/// Last version played
/// </summary>
public uint LastVersionPlayed { get; set; }
public uint LastVersionPlayed;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy1 { get; set; }
public uint Dummy1;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy2 { get; set; }
public uint Dummy2;
/// <summary>
/// Total size of GCF file in bytes.
/// </summary>
public uint FileSize { get; set; }
public uint FileSize;
/// <summary>
/// Size of each data block in bytes.
/// </summary>
public uint BlockSize { get; set; }
public uint BlockSize;
/// <summary>
/// Number of data blocks.
/// </summary>
public uint BlockCount { get; set; }
public uint BlockCount;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy3 { get; set; }
public uint Dummy3;
}
}

View File

@@ -1,10 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.InstallShieldArchiveV3
{
/// <see href="https://github.com/wfr/unshieldv3/blob/master/ISArchiveV3.cpp"/>
[StructLayout(LayoutKind.Sequential)]
public class Directory
{
public string? Name { get; set; }
[MarshalAs(UnmanagedType.BStr)]
public string? Name;
public ushort FileCount { get; set; }
public ushort FileCount;
}
}

View File

@@ -1,32 +1,37 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.InstallShieldArchiveV3
{
/// <see href="https://github.com/wfr/unshieldv3/blob/master/ISArchiveV3.h"/>
[StructLayout(LayoutKind.Sequential)]
public class File
{
public byte VolumeEnd { get; set; }
public byte VolumeEnd;
public ushort Index { get; set; }
public ushort Index;
public uint UncompressedSize { get; set; }
public uint UncompressedSize;
public uint CompressedSize { get; set; }
public uint CompressedSize;
public uint Offset { get; set; }
public uint Offset;
public uint DateTime { get; set; }
public uint DateTime;
public uint Reserved0 { get; set; }
public uint Reserved0;
public ushort ChunkSize { get; set; }
public ushort ChunkSize;
public Attributes Attrib { get; set; }
[MarshalAs(UnmanagedType.U1)]
public Attributes Attrib;
public byte IsSplit { get; set; }
public byte IsSplit;
public byte Reserved1 { get; set; }
public byte Reserved1;
public byte VolumeStart { get; set; }
public byte VolumeStart;
public string? Name { get; set; }
[MarshalAs(UnmanagedType.AnsiBStr)]
public string? Name;
}
}

View File

@@ -1,50 +1,53 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.InstallShieldArchiveV3
{
/// <see href="https://github.com/wfr/unshieldv3/blob/master/ISArchiveV3.h"/>
[StructLayout(LayoutKind.Sequential)]
public class Header
{
public uint Signature1 { get; set; }
public uint Signature1;
public uint Signature2 { get; set; }
public uint Signature2;
public ushort Reserved0 { get; set; }
public ushort Reserved0;
public ushort IsMultivolume { get; set; }
public ushort IsMultivolume;
public ushort FileCount { get; set; }
public ushort FileCount;
public uint DateTime { get; set; }
public uint DateTime;
public uint CompressedSize { get; set; }
public uint CompressedSize;
public uint UncompressedSize { get; set; }
public uint UncompressedSize;
public uint Reserved1 { get; set; }
public uint Reserved1;
/// <remarks>
/// Set in first vol only, zero in subsequent vols
/// </remarks>
public byte VolumeTotal { get; set; }
public byte VolumeTotal;
/// <remarks>
/// [1...n]
/// </remarks>
public byte VolumeNumber { get; set; }
public byte VolumeNumber;
public byte Reserved2 { get; set; }
public byte Reserved2;
public uint SplitBeginAddress { get; set; }
public uint SplitBeginAddress;
public uint SplitEndAddress { get; set; }
public uint SplitEndAddress;
public uint TocAddress { get; set; }
public uint TocAddress;
public uint Reserved3 { get; set; }
public uint Reserved3;
public ushort DirCount { get; set; }
public ushort DirCount;
public uint Reserved4 { get; set; }
public uint Reserved4;
public uint Reserved5 { get; set; }
public uint Reserved5;
}
}

View File

@@ -1,31 +1,35 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.InstallShieldCabinet
{
/// <see href="https://github.com/twogood/unshield/blob/main/lib/cabfile.h"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class CommonHeader
{
/// <summary>
/// "ISc("
/// </summary>
public string? Signature { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
public string? Signature;
/// <summary>
/// Encoded version
/// </summary>
public uint Version { get; set; }
public uint Version;
/// <summary>
/// Volume information
/// </summary>
public uint VolumeInfo { get; set; }
public uint VolumeInfo;
/// <summary>
/// Offset to cabinet descriptor
/// </summary>
public uint DescriptorOffset { get; set; }
public uint DescriptorOffset;
/// <summary>
/// Cabinet descriptor size
/// </summary>
public uint DescriptorSize { get; set; }
public uint DescriptorSize;
}
}

View File

@@ -33,7 +33,7 @@ namespace SabreTools.Models.InstallShieldCabinet
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved0 { get; set; }
public ushort Reserved0 { get; set; }
/// <summary>
/// Reserved offset
@@ -78,6 +78,7 @@ namespace SabreTools.Models.InstallShieldCabinet
/// <summary>
/// Reserved
/// </summary>
/// <remarks>32 bytes</remarks>
public byte[]? Reserved1 { get; set; }
/// <summary>
@@ -93,11 +94,13 @@ namespace SabreTools.Models.InstallShieldCabinet
/// <summary>
/// Reserved
/// </summary>
/// <remarks>28 bytes</remarks>
public byte[]? Reserved2 { get; set; }
/// <summary>
/// Reserved
/// </summary>
/// <remarks>2 bytes (<= v5), 1 byte (> v5)</remarks>
public byte[]? Reserved3 { get; set; }
/// <summary>

View File

@@ -1,3 +1,5 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.InstallShieldCabinet
{
/// <see href="https://github.com/twogood/unshield/blob/main/lib/cabfile.h"/>
@@ -6,116 +8,118 @@ namespace SabreTools.Models.InstallShieldCabinet
/// <summary>
/// Offset to the descriptor strings
/// </summary>
public uint StringsOffset { get; set; }
public uint StringsOffset;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved0 { get; set; }
public uint Reserved0;
/// <summary>
/// Offset to the component list
/// </summary>
public uint ComponentListOffset { get; set; }
public uint ComponentListOffset;
/// <summary>
/// Offset to the file table
/// </summary>
public uint FileTableOffset { get; set; }
public uint FileTableOffset;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved1 { get; set; }
public uint Reserved1;
/// <summary>
/// Size of the file table
/// </summary>
public uint FileTableSize { get; set; }
public uint FileTableSize;
/// <summary>
/// Redundant size of the file table
/// </summary>
public uint FileTableSize2 { get; set; }
public uint FileTableSize2;
/// <summary>
/// Number of directories
/// </summary>
public ushort DirectoryCount { get; set; }
public ushort DirectoryCount;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved2 { get; set; }
public uint Reserved2;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved3 { get; set; }
public ushort Reserved3;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved4 { get; set; }
public uint Reserved4;
/// <summary>
/// Number of files
/// </summary>
public uint FileCount { get; set; }
public uint FileCount;
/// <summary>
/// Redundant offset to the file table
/// </summary>
public uint FileTableOffset2 { get; set; }
public uint FileTableOffset2;
/// <summary>
/// Number of component table infos
/// </summary>
public ushort ComponentTableInfoCount { get; set; }
public ushort ComponentTableInfoCount;
/// <summary>
/// Offset to the component table
/// </summary>
public uint ComponentTableOffset { get; set; }
public uint ComponentTableOffset;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved5 { get; set; }
public uint Reserved5;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved6 { get; set; }
public uint Reserved6;
/// <summary>
/// Offsets to the file groups
/// </summary>
public uint[]? FileGroupOffsets { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 71)]
public uint[]? FileGroupOffsets;
/// <summary>
/// Offsets to the components
/// </summary>
public uint[]? ComponentOffsets { get; set; }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 71)]
public uint[]? ComponentOffsets;
/// <summary>
/// Offset to the setup types
/// </summary>
public uint SetupTypesOffset { get; set; }
public uint SetupTypesOffset;
/// <summary>
/// Offset to the setup table
/// </summary>
public uint SetupTableOffset { get; set; }
public uint SetupTableOffset;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved7 { get; set; }
public uint Reserved7;
/// <summary>
/// Reserved
/// </summary>
public byte[]? Reserved8 { get; set; }
public uint Reserved8;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.LinearExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.LinearExecutable
{
/// <summary>
/// The Fixup Page Table provides a simple mapping of a logical page number
@@ -15,6 +17,7 @@
/// </summary>
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class FixupPageTableEntry
{
/// <summary>
@@ -28,6 +31,6 @@
/// This field specifies the offset following the last fixup record in the
/// fixup record table. This is the last entry in the fixup page table. (n + 1)
/// </remarks>
public uint Offset { get; set; }
public uint Offset;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.LinearExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.LinearExecutable
{
/// <summary>
/// The `information block` in the LE header contains the linker version number,
@@ -10,6 +12,7 @@
/// </summary>
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class InformationBlock
{
/// <summary>
@@ -21,7 +24,8 @@
/// The signature word is used by the loader to identify the EXE
/// file as a valid 32-bit Linear Executable Module Format.
/// </remarks>
public string? Signature { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]
public string? Signature;
/// <summary>
/// Byte Ordering.
@@ -29,7 +33,8 @@
/// <remarks>
/// This byte specifies the byte ordering for the linear EXE format.
/// </remarks>
public ByteOrder ByteOrder { get; set; }
[MarshalAs(UnmanagedType.U1)]
public ByteOrder ByteOrder;
/// <summary>
/// Word Ordering.
@@ -37,7 +42,8 @@
/// <remarks>
/// This byte specifies the Word ordering for the linear EXE format.
/// </remarks>
public WordOrder WordOrder { get; set; }
[MarshalAs(UnmanagedType.U1)]
public WordOrder WordOrder;
/// <summary>
/// Linear EXE Format Level.
@@ -49,7 +55,7 @@
/// future EXE file versions so that an appropriate error message may be
/// displayed if an attempt is made to load them.
/// </remarks>
public uint ExecutableFormatLevel { get; set; }
public uint ExecutableFormatLevel;
/// <summary>
/// Module CPU Type.
@@ -57,7 +63,8 @@
/// <remarks>
/// This field specifies the type of CPU required by this module to run.
/// </remarks>
public CPUType CPUType { get; set; }
[MarshalAs(UnmanagedType.U2)]
public CPUType CPUType;
/// <summary>
/// Module OS Type.
@@ -65,7 +72,8 @@
/// <remarks>
/// This field specifies the type of Operating system required to run this module.
/// </remarks>
public OperatingSystem ModuleOS { get; set; }
[MarshalAs(UnmanagedType.U2)]
public OperatingSystem ModuleOS;
/// <summary>
/// Module version
@@ -74,12 +82,13 @@
/// This is useful for differentiating between revisions of dynamic linked modules.
/// This value is specified at link time by the user.
/// </remarks>
public uint ModuleVersion { get; set; }
public uint ModuleVersion;
/// <summary>
/// Module type flags
/// </summary>
public ModuleFlags ModuleTypeFlags { get; set; }
[MarshalAs(UnmanagedType.U4)]
public ModuleFlags ModuleTypeFlags;
/// <summary>
/// Number of pages in module.
@@ -94,7 +103,7 @@
/// EXE module. This is used to determine the size of the page information tables
/// in the linear EXE module.
/// </remarks>
public uint ModuleNumberPages { get; set; }
public uint ModuleNumberPages;
/// <summary>
/// The Object number to which the Entry Address is relative.
@@ -109,7 +118,7 @@
/// is set, then the object to which this field refers must be a 32-bit object (i.e.,
/// the Big/Default bit must be set in the object flags; see below).
/// </remarks>
public uint InitialObjectCS { get; set; }
public uint InitialObjectCS;
/// <summary>
/// Entry Address of module.
@@ -118,7 +127,7 @@
/// The Entry Address is the starting address for program modules and the library
/// initialization and Library termination address for library modules.
/// </remarks>
public uint InitialEIP { get; set; }
public uint InitialEIP;
/// <summary>
/// The Object number to which the ESP is relative.
@@ -128,7 +137,7 @@
/// nonzero value for a program module to be correctly loaded. This field is ignored
/// for a library module.
/// </remarks>
public uint InitialObjectSS { get; set; }
public uint InitialObjectSS;
/// <summary>
/// Starting stack address of module.
@@ -138,7 +147,7 @@
/// value in this field indicates that the stack pointer is to be initialized to the
/// highest address/offset in the object. This field is ignored for a library module.
/// </remarks>
public uint InitialESP { get; set; }
public uint InitialESP;
/// <summary>
/// The size of one page for this system.
@@ -148,7 +157,7 @@
/// For the initial version of this linear EXE format the page size is 4Kbytes.
/// (The 4K page size is specified by a value of 4096 in this field.)
/// </remarks>
public uint MemoryPageSize { get; set; }
public uint MemoryPageSize;
/// <summary>
/// The shift left bits for page offsets.
@@ -162,7 +171,7 @@
/// 512 byte (disk sector) basis. The default value for this field is 12 (decimal),
/// which give a 4096 byte alignment. All other offsets are byte aligned.
/// </remarks>
public uint BytesOnLastPage { get; set; }
public uint BytesOnLastPage;
/// <summary>
/// Total size of the fixup information in bytes.
@@ -174,7 +183,7 @@
/// - Import Module name Table
/// - Import Procedure Name Table
/// </remarks>
public uint FixupSectionSize { get; set; }
public uint FixupSectionSize;
/// <summary>
/// Checksum for fixup information.
@@ -185,7 +194,7 @@
/// not always loaded into main memory with the 'loader section'. If the checksum
/// feature is not implemented, then the linker will set these fields to zero.
/// </remarks>
public uint FixupSectionChecksum { get; set; }
public uint FixupSectionChecksum;
/// <summary>
/// Size of memory resident tables.
@@ -195,7 +204,7 @@
/// for the module, while the module is in use. This total size includes all
/// tables from the Object Table down to and including the Per-Page Checksum Table.
/// </remarks>
public uint LoaderSectionSize { get; set; }
public uint LoaderSectionSize;
/// <summary>
/// Checksum for loader section.
@@ -205,7 +214,7 @@
/// If the checksum feature is not implemented, then the linker will set these fields
/// to zero.
/// </remarks>
public uint LoaderSectionChecksum { get; set; }
public uint LoaderSectionChecksum;
/// <summary>
/// Object Table offset.
@@ -213,7 +222,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint ObjectTableOffset { get; set; }
public uint ObjectTableOffset;
/// <summary>
/// Object Table Count.
@@ -221,7 +230,7 @@
/// <remarks>
/// This defines the number of entries in Object Table.
/// </remarks>
public uint ObjectTableCount { get; set; }
public uint ObjectTableCount;
/// <summary>
/// Object Page Table offset
@@ -229,7 +238,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint ObjectPageMapOffset { get; set; }
public uint ObjectPageMapOffset;
/// <summary>
/// Object Iterated Pages offset.
@@ -237,7 +246,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint ObjectIterateDataMapOffset { get; set; }
public uint ObjectIterateDataMapOffset;
/// <summary>
/// Resource Table offset
@@ -245,12 +254,12 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint ResourceTableOffset { get; set; }
public uint ResourceTableOffset;
/// <summary>
/// Number of entries in Resource Table.
/// </summary>
public uint ResourceTableCount { get; set; }
public uint ResourceTableCount;
/// <summary>
/// Resident Name Table offset.
@@ -258,7 +267,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint ResidentNamesTableOffset { get; set; }
public uint ResidentNamesTableOffset;
/// <summary>
/// Entry Table offset.
@@ -266,7 +275,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint EntryTableOffset { get; set; }
public uint EntryTableOffset;
/// <summary>
/// Module Format Directives Table offset.
@@ -274,7 +283,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint ModuleDirectivesTableOffset { get; set; }
public uint ModuleDirectivesTableOffset;
/// <summary>
/// Number of Module Format Directives in the Table.
@@ -283,7 +292,7 @@
/// This field specifies the number of entries in the
/// Module Format Directives Table.
/// </remarks>
public uint ModuleDirectivesCount { get; set; }
public uint ModuleDirectivesCount;
/// <summary>
/// Fixup Page Table offset.
@@ -291,7 +300,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint FixupPageTableOffset { get; set; }
public uint FixupPageTableOffset;
/// <summary>
/// Fixup Record Table offset.
@@ -299,7 +308,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint FixupRecordTableOffset { get; set; }
public uint FixupRecordTableOffset;
/// <summary>
/// Import Module Name Table offset.
@@ -307,12 +316,12 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint ImportedModulesNameTableOffset { get; set; }
public uint ImportedModulesNameTableOffset;
/// <summary>
/// The number of entries in the Import Module Name Table.
/// </summary>
public uint ImportedModulesCount { get; set; }
public uint ImportedModulesCount;
/// <summary>
/// Import Procedure Name Table offset.
@@ -320,7 +329,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint ImportProcedureNameTableOffset { get; set; }
public uint ImportProcedureNameTableOffset;
/// <summary>
/// Per-page Checksum Table offset.
@@ -328,7 +337,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint PerPageChecksumTableOffset { get; set; }
public uint PerPageChecksumTableOffset;
/// <summary>
/// Data Pages Offset.
@@ -336,7 +345,7 @@
/// <remarks>
/// This offset is relative to the beginning of the EXE file.
/// </remarks>
public uint DataPagesOffset { get; set; }
public uint DataPagesOffset;
/// <summary>
/// Number of Preload pages for this module.
@@ -345,7 +354,7 @@
/// Note that OS/2 2.0 does not respect the preload of pages as specified
/// in the executable file for performance reasons.
/// </remarks>
public uint PreloadPageCount { get; set; }
public uint PreloadPageCount;
/// <summary>
/// Non-Resident Name Table offset.
@@ -353,12 +362,12 @@
/// <remarks>
/// This offset is relative to the beginning of the EXE file.
/// </remarks>
public uint NonResidentNamesTableOffset { get; set; }
public uint NonResidentNamesTableOffset;
/// <summary>
/// Number of bytes in the Non-resident name table.
/// </summary>
public uint NonResidentNamesTableLength { get; set; }
public uint NonResidentNamesTableLength;
/// <summary>
/// Non-Resident Name Table Checksum.
@@ -366,7 +375,7 @@
/// <remarks>
/// This is a cryptographic checksum of the Non-Resident Name Table.
/// </remarks>
public uint NonResidentNamesTableChecksum { get; set; }
public uint NonResidentNamesTableChecksum;
/// <summary>
/// The Auto Data Segment Object number.
@@ -376,7 +385,7 @@
/// This field is supported for 16-bit compatibility only and is not used by
/// 32-bit modules.
/// </remarks>
public uint AutomaticDataObject { get; set; }
public uint AutomaticDataObject;
/// <summary>
/// Debug Information offset.
@@ -384,7 +393,7 @@
/// <remarks>
/// This offset is relative to the beginning of the linear EXE header.
/// </remarks>
public uint DebugInformationOffset { get; set; }
public uint DebugInformationOffset;
/// <summary>
/// Debug Information length.
@@ -392,7 +401,7 @@
/// <remarks>
/// The length of the debug information in bytes.
/// </remarks>
public uint DebugInformationLength { get; set; }
public uint DebugInformationLength;
/// <summary>
/// Instance pages in preload section.
@@ -400,7 +409,7 @@
/// <remarks>
/// The number of instance data pages found in the preload section.
/// </remarks>
public uint PreloadInstancePagesNumber { get; set; }
public uint PreloadInstancePagesNumber;
/// <summary>
/// Instance pages in demand section.
@@ -408,7 +417,7 @@
/// <remarks>
/// The number of instance data pages found in the demand section.
/// </remarks>
public uint DemandInstancePagesNumber { get; set; }
public uint DemandInstancePagesNumber;
/// <summary>
/// Heap size added to the Auto DS Object.
@@ -418,6 +427,6 @@
/// by the loader. This field is supported for 16-bit compatibility only and
/// is not used by 32-bit modules.
/// </remarks>
public uint ExtraHeapAllocation { get; set; }
public uint ExtraHeapAllocation;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.LinearExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.LinearExecutable
{
/// <summary>
/// The Module Format Directives Table is an optional table that allows additional
@@ -13,6 +15,7 @@
/// </summary>
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ModuleFormatDirectivesTableEntry
{
/// <summary>
@@ -22,7 +25,8 @@
/// The directive number specifies the type of directive defined. This can be
/// used to determine the format of the information in the directive data.
/// </remarks>
public DirectiveNumber DirectiveNumber { get; set; }
[MarshalAs(UnmanagedType.U2)]
public DirectiveNumber DirectiveNumber;
/// <summary>
/// Directive data length.
@@ -30,7 +34,7 @@
/// <remarks>
/// This specifies the length in byte of the directive data for this directive number.
/// </remarks>
public ushort DirectiveDataLength { get; set; }
public ushort DirectiveDataLength;
/// <summary>
/// Directive data offset.
@@ -40,6 +44,6 @@
/// to beginning of linear EXE header for a resident table, and relative to the
/// beginning of the EXE file for non-resident tables.
/// </remarks>
public uint DirectiveDataOffset { get; set; }
public uint DirectiveDataOffset;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.LinearExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.LinearExecutable
{
/// <summary>
/// The Object page table provides information about a logical page in an object.
@@ -13,6 +15,7 @@
/// </summary>
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ObjectPageMapEntry
{
/// <summary>
@@ -35,7 +38,7 @@
/// The logical page number (Object Page Table index), is used to index the Fixup
/// Page Table to find any fixups associated with the logical page.
/// </remarks>
public uint PageDataOffset { get; set; }
public uint PageDataOffset;
/// <summary>
/// Number of bytes of data for this page.
@@ -47,11 +50,12 @@
/// bytes are to be filled with zeros. If the FLAGS field indicates an Iterated Data
/// Page, the iterated data records will completely fill out the remainder.
/// </remarks>
public ushort DataSize { get; set; }
public ushort DataSize;
/// <summary>
/// Attributes specifying characteristics of this logical page.
/// </summary>
public ObjectPageFlags Flags { get; set; }
[MarshalAs(UnmanagedType.U2)]
public ObjectPageFlags Flags;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.LinearExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.LinearExecutable
{
/// <summary>
/// The object table contains information that describes each segment in
@@ -12,6 +14,7 @@
/// </remarks>
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ObjectTableEntry
{
/// <summary>
@@ -24,7 +27,7 @@
/// file for the object. This memory size must also be large enough to
/// contain all of the iterated data and uninitialized data in the EXE file.
/// </remarks>
public uint VirtualSegmentSize { get; set; }
public uint VirtualSegmentSize;
/// <summary>
/// Relocation Base Address.
@@ -34,12 +37,13 @@
/// internal relocation fixups for the module have been removed, this is the
/// address the object will be allocated at by the loader.
/// </remarks>
public uint RelocationBaseAddress { get; set; }
public uint RelocationBaseAddress;
/// <summary>
/// Flag bits for the object.
/// </summary>
public ObjectFlags ObjectFlags { get; set; }
[MarshalAs(UnmanagedType.U2)]
public ObjectFlags ObjectFlags;
/// <summary>
/// Object Page Table Index.
@@ -53,7 +57,7 @@
/// other words the object table entries are sorted based on the object page table
/// index value.
/// </remarks>
public uint PageTableIndex { get; set; }
public uint PageTableIndex;
/// <summary>
/// # of object page table entries for this object.
@@ -69,11 +73,11 @@
/// was neither a zero filled or invalid page, then the additional pages are treated
/// as zero filled pages.
/// </remarks>
public uint PageTableEntries { get; set; }
public uint PageTableEntries;
/// <summary>
/// Reserved for future use. Must be set to zero.
/// </summary>
public uint Reserved { get; set; }
public uint Reserved;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.LinearExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.LinearExecutable
{
/// <summary>
/// The Per-Page Checksum table provides space for a cryptographic checksum for
@@ -11,11 +13,12 @@
/// </summary>
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class PerPageChecksumTableEntry
{
/// <summary>
/// Cryptographic checksum.
/// </summary>
public uint Checksum { get; set; }
public uint Checksum;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.LinearExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.LinearExecutable
{
/// <summary>
/// The resource table is an array of resource table entries. Each resource table
@@ -13,31 +15,33 @@
/// </summary>
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ResourceTableEntry
{
/// <summary>
/// Resource type ID.
/// </summary>
public ResourceTableEntryType TypeID { get; set; }
[MarshalAs(UnmanagedType.U4)]
public ResourceTableEntryType TypeID;
/// <summary>
/// An ID used as a name for the resource when referred to.
/// </summary>
public ushort NameID { get; set; }
public ushort NameID;
/// <summary>
/// The number of bytes the resource consists of.
/// </summary>
public uint ResourceSize { get; set; }
public uint ResourceSize;
/// <summary>
/// The number of the object which contains the resource.
/// </summary>
public ushort ObjectNumber { get; set; }
public ushort ObjectNumber;
/// <summary>
/// The offset within the specified object where the resource begins.
/// </summary>
public uint Offset { get; set; }
public uint Offset;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.LinearExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.LinearExecutable
{
/// <summary>
/// The Verify Record Directive Table is an optional table. It maintains a record
@@ -9,6 +11,7 @@
/// </summary>
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class VerifyRecordDirectiveTableEntry
{
/// <summary>
@@ -19,7 +22,7 @@
/// directive table. This is equal to the number of modules referenced by
/// this module.
/// </remarks>
public ushort EntryCount { get; set; }
public ushort EntryCount;
/// <summary>
/// Ordinal index into the Import Module Name Table.
@@ -28,7 +31,7 @@
/// This value is an ordered index in to the Import Module Name Table for
/// the referenced module.
/// </remarks>
public ushort OrdinalIndex { get; set; }
public ushort OrdinalIndex;
/// <summary>
/// Module Version.
@@ -41,7 +44,7 @@
/// number in a module to be incremented anytime the entry point offsets
/// change.
/// </remarks>
public ushort Version { get; set; }
public ushort Version;
/// <summary>
/// Module # of Object Entries.
@@ -50,7 +53,7 @@
/// This field is used to identify the number of object verify entries
/// that follow for the referenced module.
/// </remarks>
public ushort ObjectEntriesCount { get; set; }
public ushort ObjectEntriesCount;
/// <summary>
/// Object # in Module.
@@ -59,7 +62,7 @@
/// This field specifies the object number in the referenced module that
/// is being verified.
/// </remarks>
public ushort ObjectNumberInModule { get; set; }
public ushort ObjectNumberInModule;
/// <summary>
/// Object load base address.
@@ -68,7 +71,7 @@
/// This is the address that the object was loaded at when the fixups were
/// performed.
/// </remarks>
public ushort ObjectLoadBaseAddress { get; set; }
public ushort ObjectLoadBaseAddress;
/// <summary>
/// Object virtual address size.
@@ -77,6 +80,6 @@
/// This field specifies the total amount of virtual memory required for
/// this object.
/// </remarks>
public ushort ObjectVirtualAddressSize { get; set; }
public ushort ObjectVirtualAddressSize;
}
}

View File

@@ -1,19 +1,22 @@
namespace SabreTools.Models.MSDOS
using System.Runtime.InteropServices;
namespace SabreTools.Models.MSDOS
{
/// <summary>
/// Each pointer in the relocation table looks as such
/// </summary>
/// <see href="https://wiki.osdev.org/MZ"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class RelocationEntry
{
/// <summary>
/// Offset of the relocation within provided segment.
/// </summary>
public ushort Offset { get; set; }
public ushort Offset;
/// <summary>
/// Segment of the relocation, relative to the load segment address.
/// </summary>
public ushort Segment { get; set; }
public ushort Segment;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.MoPaQ
using System.Runtime.InteropServices;
namespace SabreTools.Models.MoPaQ
{
/// <summary>
/// Block table contains informations about file sizes and way of their storage within
@@ -6,26 +8,28 @@
/// of block table entry is (like hash table entry). The block table is also encrypted.
/// </summary>
/// <see href="http://zezula.net/en/mpq/mpqformat.html"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class BlockEntry
{
/// <summary>
/// Offset of the beginning of the file data, relative to the beginning of the archive.
/// </summary>
public uint FilePosition { get; set; }
public uint FilePosition;
/// <summary>
/// Compressed file size
/// </summary>
public uint CompressedSize { get; set; }
public uint CompressedSize;
/// <summary>
/// Size of uncompressed file
/// </summary>
public uint UncompressedSize { get; set; }
public uint UncompressedSize;
/// <summary>
/// Flags for the file.
/// </summary>
public FileFlags Flags { get; set; }
[MarshalAs(UnmanagedType.U4)]
public FileFlags Flags;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.MoPaQ
using System.Runtime.InteropServices;
namespace SabreTools.Models.MoPaQ
{
/// <summary>
/// Hash table is used for searching files by name. The file name is converted to
@@ -8,29 +10,31 @@
/// table is 16 bytes.
/// </summary>
/// <see href="http://zezula.net/en/mpq/mpqformat.html"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class HashEntry
{
/// <summary>
/// The hash of the full file name (part A)
/// </summary>
public uint NameHashPartA { get; set; }
public uint NameHashPartA;
/// <summary>
/// The hash of the full file name (part B)
/// </summary>
public uint NameHashPartB { get; set; }
public uint NameHashPartB;
/// <summary>
/// The language of the file. This is a Windows LANGID data type, and uses the same values.
/// 0 indicates the default language (American English), or that the file is language-neutral.
/// </summary>
public Locale Locale { get; set; }
[MarshalAs(UnmanagedType.I2)]
public Locale Locale;
/// <summary>
/// The platform the file is used for. 0 indicates the default platform.
/// No other values have been observed.
/// </summary>
public ushort Platform { get; set; }
public ushort Platform;
/// <summary>
/// If the hash table entry is valid, this is the index into the block table of the file.
@@ -40,6 +44,6 @@
/// - FFFFFFFEh: Hash table entry is empty, but was valid at some point (a deleted file).
/// Does not terminate searches for a given file.
/// </summary>
public uint BlockIndex { get; set; }
public uint BlockIndex;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ChecksumEntry
{
/// <summary>
/// Checksum.
/// </summary>
public uint Checksum { get; set; }
public uint Checksum;
}
}

View File

@@ -1,16 +1,19 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ChecksumHeader
{
/// <summary>
/// Always 0x00000001
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Size of LPNCFCHECKSUMHEADER & LPNCFCHECKSUMMAPHEADER & in bytes.
/// </summary>
public uint ChecksumSize { get; set; }
public uint ChecksumSize;
}
}

View File

@@ -1,16 +1,19 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ChecksumMapEntry
{
/// <summary>
/// Number of checksums.
/// </summary>
public uint ChecksumCount { get; set; }
public uint ChecksumCount;
/// <summary>
/// Index of first checksum.
/// </summary>
public uint FirstChecksumIndex { get; set; }
public uint FirstChecksumIndex;
}
}

View File

@@ -1,26 +1,29 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ChecksumMapHeader
{
/// <summary>
/// Always 0x14893721
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Always 0x00000001
/// </summary>
public uint Dummy1 { get; set; }
public uint Dummy1;
/// <summary>
/// Number of items.
/// </summary>
public uint ItemCount { get; set; }
public uint ItemCount;
/// <summary>
/// Number of checksums.
/// </summary>
public uint ChecksumCount { get; set; }
public uint ChecksumCount;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryCopyEntry
{
/// <summary>
/// Index of the directory item.
/// </summary>
public uint DirectoryIndex { get; set; }
public uint DirectoryIndex;
}
}

View File

@@ -1,76 +1,79 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryHeader
{
/// <summary>
/// Always 0x00000004
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Cache ID.
/// </summary>
public uint CacheID { get; set; }
public uint CacheID;
/// <summary>
/// NCF file version.
/// </summary>
public uint LastVersionPlayed { get; set; }
public uint LastVersionPlayed;
/// <summary>
/// Number of items in the directory.
/// </summary>
public uint ItemCount { get; set; }
public uint ItemCount;
/// <summary>
/// Number of files in the directory.
/// </summary>
public uint FileCount { get; set; }
public uint FileCount;
/// <summary>
/// Always 0x00008000. Data per checksum?
/// </summary>
public uint ChecksumDataLength { get; set; }
public uint ChecksumDataLength;
/// <summary>
/// Size of lpNCFDirectoryEntries & lpNCFDirectoryNames & lpNCFDirectoryInfo1Entries & lpNCFDirectoryInfo2Entries & lpNCFDirectoryCopyEntries & lpNCFDirectoryLocalEntries in bytes.
/// </summary>
public uint DirectorySize { get; set; }
public uint DirectorySize;
/// <summary>
/// Size of the directory names in bytes.
/// </summary>
public uint NameSize { get; set; }
public uint NameSize;
/// <summary>
/// Number of Info1 entires.
/// </summary>
public uint Info1Count { get; set; }
public uint Info1Count;
/// <summary>
/// Number of files to copy.
/// </summary>
public uint CopyCount { get; set; }
public uint CopyCount;
/// <summary>
/// Number of files to keep local.
/// </summary>
public uint LocalCount { get; set; }
public uint LocalCount;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy1 { get; set; }
public uint Dummy1;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy2 { get; set; }
public uint Dummy2;
/// <summary>
/// Header checksum.
/// </summary>
public uint Checksum { get; set; }
public uint Checksum;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryInfo1Entry
{
/// <summary>
/// Reserved
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryInfo2Entry
{
/// <summary>
/// Reserved
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DirectoryLocalEntry
{
/// <summary>
/// Index of the directory item.
/// </summary>
public uint DirectoryIndex { get; set; }
public uint DirectoryIndex;
}
}

View File

@@ -1,61 +1,64 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class Header
{
/// <summary>
/// Always 0x00000001
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Always 0x00000002
/// </summary>
public uint MajorVersion { get; set; }
public uint MajorVersion;
/// <summary>
/// NCF version number.
/// </summary>
public uint MinorVersion { get; set; }
public uint MinorVersion;
/// <summary>
/// Cache ID
/// </summary>
public uint CacheID { get; set; }
public uint CacheID;
/// <summary>
/// Last version played
/// </summary>
public uint LastVersionPlayed { get; set; }
public uint LastVersionPlayed;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy1 { get; set; }
public uint Dummy1;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy2 { get; set; }
public uint Dummy2;
/// <summary>
/// Total size of NCF file in bytes.
/// </summary>
public uint FileSize { get; set; }
public uint FileSize;
/// <summary>
/// Size of each data block in bytes.
/// </summary>
public uint BlockSize { get; set; }
public uint BlockSize;
/// <summary>
/// Number of data blocks.
/// </summary>
public uint BlockCount { get; set; }
public uint BlockCount;
/// <summary>
/// Reserved
/// </summary>
public uint Dummy3 { get; set; }
public uint Dummy3;
}
}

View File

@@ -1,11 +1,14 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class UnknownEntry
{
/// <summary>
/// Reserved
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
}
}

View File

@@ -1,16 +1,19 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NCF
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/NCFFile.h"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class UnknownHeader
{
/// <summary>
/// Always 0x00000001
/// </summary>
public uint Dummy0 { get; set; }
public uint Dummy0;
/// <summary>
/// Always 0x00000000
/// </summary>
public uint Dummy1 { get; set; }
public uint Dummy1;
}
}

View File

@@ -1,3 +1,5 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.NewExecutable
{
/// <summary>
@@ -6,6 +8,7 @@ namespace SabreTools.Models.NewExecutable
/// </summary>
/// <see href="http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm"/>
/// <see href="https://github.com/libyal/libexe/blob/main/documentation/Executable%20(EXE)%20file%20format.asciidoc#24-ne-extended-header"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class ExecutableHeader
{
/// <summary>
@@ -13,38 +16,40 @@ namespace SabreTools.Models.NewExecutable
/// "N" is low-order byte.
/// "E" is high-order byte.
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]
public string? Magic;
/// <summary>
/// Version number of the linker.
/// </summary>
public byte LinkerVersion { get; set; }
public byte LinkerVersion;
/// <summary>
/// Revision number of the linker.
/// </summary>
public byte LinkerRevision { get; set; }
public byte LinkerRevision;
/// <summary>
/// Entry Table file offset, relative to the beginning of the segmented EXE header.
/// </summary>
public ushort EntryTableOffset { get; set; }
public ushort EntryTableOffset;
/// <summary>
/// Number of bytes in the entry table.
/// </summary>
public ushort EntryTableSize { get; set; }
public ushort EntryTableSize;
/// <summary>
/// 32-bit CRC of entire contents of file.
/// </summary>
/// <remarks>These words are taken as 00 during the calculation.</remarks>
public uint CrcChecksum { get; set; }
public uint CrcChecksum;
/// <summary>
/// Flag word
/// </summary>
public HeaderFlag FlagWord { get; set; }
[MarshalAs(UnmanagedType.U2)]
public HeaderFlag FlagWord;
/// <summary>
/// Segment number of automatic data segment.
@@ -57,26 +62,26 @@ namespace SabreTools.Models.NewExecutable
/// table. The first entry in the segment table is segment
/// number 1.
/// </remarks>
public ushort AutomaticDataSegmentNumber { get; set; }
public ushort AutomaticDataSegmentNumber;
/// <summary>
/// Initial size, in bytes, of dynamic heap added to the
/// data segment. This value is zero if no initial local
/// heap is allocated.
/// </summary>
public ushort InitialHeapAlloc { get; set; }
public ushort InitialHeapAlloc;
/// <summary>
/// Initial size, in bytes, of stack added to the data
/// segment. This value is zero to indicate no initial
/// stack allocation, or when SS is not equal to DS.
/// </summary>
public ushort InitialStackAlloc { get; set; }
public ushort InitialStackAlloc;
/// <summary>
/// Segment number:offset of CS:IP.
/// </summary>
public uint InitialCSIPSetting { get; set; }
public uint InitialCSIPSetting;
/// <summary>
/// Segment number:offset of SS:SP.
@@ -87,108 +92,110 @@ namespace SabreTools.Models.NewExecutable
/// automatic data segment just below the additional heap
/// area.
/// </remarks>
public uint InitialSSSPSetting { get; set; }
public uint InitialSSSPSetting;
/// <summary>
/// Number of entries in the Segment Table.
/// </summary>
public ushort FileSegmentCount { get; set; }
public ushort FileSegmentCount;
/// <summary>
/// Number of entries in the Module Reference Table.
/// </summary>
public ushort ModuleReferenceTableSize { get; set; }
public ushort ModuleReferenceTableSize;
/// <summary>
/// Number of bytes in the Non-Resident Name Table.
/// </summary>
public ushort NonResidentNameTableSize { get; set; }
public ushort NonResidentNameTableSize;
/// <summary>
/// Segment Table file offset, relative to the beginning
/// of the segmented EXE header.
/// </summary>
public ushort SegmentTableOffset { get; set; }
public ushort SegmentTableOffset;
/// <summary>
/// Resource Table file offset, relative to the beginning
/// of the segmented EXE header.
/// </summary>
public ushort ResourceTableOffset { get; set; }
public ushort ResourceTableOffset;
/// <summary>
/// Resident Name Table file offset, relative to the
/// beginning of the segmented EXE header.
/// </summary>
public ushort ResidentNameTableOffset { get; set; }
public ushort ResidentNameTableOffset;
/// <summary>
/// Module Reference Table file offset, relative to the
/// beginning of the segmented EXE header.
/// </summary>
public ushort ModuleReferenceTableOffset { get; set; }
public ushort ModuleReferenceTableOffset;
/// <summary>
/// Imported Names Table file offset, relative to the
/// beginning of the segmented EXE header.
/// </summary>
public ushort ImportedNamesTableOffset { get; set; }
public ushort ImportedNamesTableOffset;
/// <summary>
/// Non-Resident Name Table offset, relative to the
/// beginning of the file.
/// </summary>
public uint NonResidentNamesTableOffset { get; set; }
public uint NonResidentNamesTableOffset;
/// <summary>
/// Number of movable entries in the Entry Table.
/// </summary>
public ushort MovableEntriesCount { get; set; }
public ushort MovableEntriesCount;
/// <summary>
/// Logical sector alignment shift count, log(base 2) of
/// the segment sector size (default 9).
/// </summary>
public ushort SegmentAlignmentShiftCount { get; set; }
public ushort SegmentAlignmentShiftCount;
/// <summary>
/// Number of resource entries.
/// </summary>
public ushort ResourceEntriesCount { get; set; }
public ushort ResourceEntriesCount;
/// <summary>
/// Executable type, used by loader.
/// </summary>
public OperatingSystem TargetOperatingSystem { get; set; }
[MarshalAs(UnmanagedType.U1)]
public OperatingSystem TargetOperatingSystem;
/// <summary>
/// Other OS/2 flags
/// </summary>
public OS2Flag AdditionalFlags { get; set; }
[MarshalAs(UnmanagedType.U1)]
public OS2Flag AdditionalFlags;
/// <summary>
/// Offset to return thunks or start of gangload area
/// </summary>
public ushort ReturnThunkOffset { get; set; }
public ushort ReturnThunkOffset;
/// <summary>
/// Offset to segment reference thunks or size of gangload area
/// </summary>
public ushort SegmentReferenceThunkOffset { get; set; }
public ushort SegmentReferenceThunkOffset;
/// <summary>
/// Minimum code swap area size
/// </summary>
public ushort MinCodeSwapAreaSize { get; set; }
public ushort MinCodeSwapAreaSize;
/// <summary>
/// Windows SDK revison number
/// </summary>
public byte WindowsSDKRevision { get; set; }
public byte WindowsSDKRevision;
/// <summary>
/// Windows SDK version number
/// </summary>
public byte WindowsSDKVersion { get; set; }
public byte WindowsSDKVersion;
}
}

View File

@@ -1,16 +1,19 @@
namespace SabreTools.Models.NewExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.NewExecutable
{
/// <see href="http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ImportNameRelocationRecord
{
/// <summary>
/// Index into module reference table for the imported module.
/// </summary>
public ushort Index { get; set; }
public ushort Index;
/// <summary>
/// Offset within Imported Names Table to procedure name string.
/// </summary>
public ushort Offset { get; set; }
public ushort Offset;
}
}

View File

@@ -1,16 +1,19 @@
namespace SabreTools.Models.NewExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.NewExecutable
{
/// <see href="http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ImportOrdinalRelocationRecord
{
/// <summary>
/// Index into module reference table for the imported module.
/// </summary>
public ushort Index { get; set; }
public ushort Index;
/// <summary>
/// Procedure ordinal number.
/// </summary>
public ushort Ordinal { get; set; }
public ushort Ordinal;
}
}

View File

@@ -1,23 +1,26 @@
namespace SabreTools.Models.NewExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.NewExecutable
{
/// <see href="http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class InternalRefRelocationRecord
{
/// <summary>
/// Segment number for a fixed segment, or 0FFh for a
/// movable segment.
/// </summary>
public byte SegmentNumber { get; set; }
public byte SegmentNumber;
/// <summary>
/// 0
/// </summary>
public byte Reserved { get; set; }
public byte Reserved;
/// <summary>
/// Offset into segment if fixed segment, or ordinal
/// number index into Entry Table if movable segment.
/// </summary>
public ushort Offset { get; set; }
public ushort Offset;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.NewExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.NewExecutable
{
/// <summary>
/// The module-reference table follows the resident-name table. Each entry
@@ -6,11 +8,12 @@
/// names table; each entry is 2 bytes long.
/// </summary>
/// <see href="http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ModuleReferenceTableEntry
{
/// <summary>
/// Offset within Imported Names Table to referenced module name string.
/// </summary>
public ushort Offset { get; set; }
public ushort Offset;
}
}

View File

@@ -1,17 +1,21 @@
namespace SabreTools.Models.NewExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.NewExecutable
{
/// <see href="http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class OSFixupRelocationRecord
{
/// <summary>
/// Operating system fixup type.
/// Floating-point fixups.
/// </summary>
public OSFixupType FixupType { get; set; }
[MarshalAs(UnmanagedType.U2)]
public OSFixupType FixupType;
/// <summary>
/// 0
/// </summary>
public ushort Reserved { get; set; }
public ushort Reserved;
}
}

View File

@@ -1,10 +1,13 @@
namespace SabreTools.Models.NewExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.NewExecutable
{
/// <summary>
/// A table of resources for this type follows. The following is
/// the format of each resource (8 bytes each):
/// </summary>
/// <see href="http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class ResourceTypeResourceEntry
{
/// <summary>
@@ -13,17 +16,18 @@
/// of the alignment shift count value specified at
/// beginning of the resource table.
/// </summary>
public ushort Offset { get; set; }
public ushort Offset;
/// <summary>
/// Length of the resource in the file (in bytes).
/// </summary>
public ushort Length { get; set; }
public ushort Length;
/// <summary>
/// Flag word.
/// </summary>
public ResourceTypeResourceFlag FlagWord { get; set; }
[MarshalAs(UnmanagedType.U2)]
public ResourceTypeResourceFlag FlagWord;
/// <summary>
/// Resource ID. This is an integer type if the high-order
@@ -31,11 +35,11 @@
/// resource string, the offset is relative to the
/// beginning of the resource table.
/// </summary>
public ushort ResourceID { get; set; }
public ushort ResourceID;
/// <summary>
/// Reserved.
/// </summary>
public uint Reserved { get; set; }
public uint Reserved;
}
}

View File

@@ -1,4 +1,6 @@
namespace SabreTools.Models.NewExecutable
using System.Runtime.InteropServices;
namespace SabreTools.Models.NewExecutable
{
/// <summary>
/// The segment table contains an entry for each segment in the executable
@@ -7,6 +9,7 @@
/// The following is the structure of a segment table entry.
/// </summary>
/// <see href="http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class SegmentTableEntry
{
/// <summary>
@@ -14,22 +17,23 @@
/// data, relative to the beginning of the file. Zero means no
/// file data.
/// </summary>
public ushort Offset { get; set; }
public ushort Offset;
/// <summary>
/// Length of the segment in the file, in bytes. Zero means 64K.
/// </summary>
public ushort Length { get; set; }
public ushort Length;
/// <summary>
/// Flag word.
/// </summary>
public SegmentTableEntryFlag FlagWord { get; set; }
[MarshalAs(UnmanagedType.U2)]
public SegmentTableEntryFlag FlagWord;
/// <summary>
/// Minimum allocation size of the segment, in bytes. Total size
/// of the segment. Zero means 64K.
/// </summary>
public ushort MinimumAllocationSize { get; set; }
public ushort MinimumAllocationSize;
}
}

View File

@@ -27,6 +27,9 @@ namespace SabreTools.Models.OfflineList
[XmlElement("releaseNumber")]
public ReleaseNumber? ReleaseNumber { get; set; }
[XmlElement("imageNumber")]
public ImageNumber? ImageNumber { get; set; }
[XmlElement("languageNumber")]
public LanguageNumber? LanguageNumber { get; set; }

View File

@@ -1,21 +1,25 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PAK
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/PAKFile.h"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class DirectoryItem
{
/// <summary>
/// Item Name
/// </summary>
public string? ItemName { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 56)]
public string? ItemName;
/// <summary>
/// Item Offset
/// </summary>
public uint ItemOffset { get; set; }
public uint ItemOffset;
/// <summary>
/// Item Length
/// </summary>
public uint ItemLength { get; set; }
public uint ItemLength;
}
}

View File

@@ -1,21 +1,25 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PAK
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/PAKFile.h"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class Header
{
/// <summary>
/// Signature
/// </summary>
public string? Signature { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
public string? Signature;
/// <summary>
/// Directory Offset
/// </summary>
public uint DirectoryOffset { get; set; }
public uint DirectoryOffset;
/// <summary>
/// Directory Length
/// </summary>
public uint DirectoryLength { get; set; }
public uint DirectoryLength;
}
}

View File

@@ -1,24 +1,28 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PFF
{
/// <summary>
/// PFF file footer
/// </summary>
/// <see href="https://devilsclaws.net/download/file-pff-new-bz2"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class Footer
{
/// <summary>
/// Current system IP
/// </summary>
public uint SystemIP { get; set; }
public uint SystemIP;
/// <summary>
/// Reserved
/// </summary>
public uint Reserved { get; set; }
public uint Reserved;
/// <summary>
/// King tag
/// </summary>
public string? KingTag { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
public string? KingTag;
}
}

View File

@@ -1,3 +1,5 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PFF
{
/// <summary>
@@ -5,32 +7,34 @@ namespace SabreTools.Models.PFF
/// </summary>
/// <remarks>Versions 2, 3, and 4 supported</remarks>
/// <see href="https://devilsclaws.net/download/file-pff-new-bz2"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class Header
{
/// <summary>
/// Size of the following header
/// </summary>
public uint HeaderSize { get; set; }
public uint HeaderSize;
/// <summary>
/// Signature
/// </summary>
/// <remarks>Versions 2 and 3 share the same signature but different header sizes</remarks>
public string? Signature { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
public string? Signature;
/// <summary>
/// Number of files
/// </summary>
public uint NumberOfFiles { get; set; }
public uint NumberOfFiles;
/// <summary>
/// File segment size
/// </summary>
public uint FileSegmentSize { get; set; }
public uint FileSegmentSize;
/// <summary>
/// File list offset
/// </summary>
public uint FileListOffset { get; set; }
public uint FileListOffset;
}
}

View File

@@ -7,10 +7,6 @@ namespace SabreTools.Models.PIC
{
/// <summary>
/// Disc Type Identifier
/// = "BDO" for BD-ROM
/// = "BDU" for BD-ROM Ultra
/// = "BDW" for BD-RE
/// = "BDR" for BD-R
/// </summary>
public string? DiscTypeIdentifier { get; set; }

View File

@@ -1,43 +1,47 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PIC
{
/// <see href="https://www.t10.org/ftp/t10/document.05/05-206r0.pdf"/>
/// <see href="https://github.com/aaru-dps/Aaru.Decoders/blob/devel/Bluray/DI.cs"/>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public class DiscInformationUnitHeader
{
/// <summary>
/// Disc Information Identifier "DI"
/// Emergency Brake Identifier "EB"
/// </summary>
public string? DiscInformationIdentifier { get; set; }
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]
public string? DiscInformationIdentifier;
/// <summary>
/// Disc Information Format
/// </summary>
public byte DiscInformationFormat { get; set; }
public byte DiscInformationFormat;
/// <summary>
/// Number of DI units in each DI block
/// </summary>
public byte NumberOfUnitsInBlock { get; set; }
public byte NumberOfUnitsInBlock;
/// <summary>
/// Should be 0x00
/// </summary>
public byte Reserved0 { get; set; }
public byte Reserved0;
/// <summary>
/// DI unit Sequence Number
/// </summary>
public byte SequenceNumber { get; set; }
public byte SequenceNumber;
/// <summary>
/// Number of bytes in use in this DI unit
/// </summary>
public byte BytesInUse { get; set; }
public byte BytesInUse;
/// <summary>
/// Should be 0x00
/// </summary>
public byte Reserved1 { get; set; }
public byte Reserved1;
}
}

View File

@@ -1,3 +1,5 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PIC
{
/// <summary>
@@ -5,28 +7,31 @@ namespace SabreTools.Models.PIC
/// </summary>
/// <see href="https://www.t10.org/ftp/t10/document.05/05-206r0.pdf"/>
/// <see href="https://github.com/aaru-dps/Aaru.Decoders/blob/devel/Bluray/DI.cs"/>
[StructLayout(LayoutKind.Sequential)]
public class DiscInformationUnitTrailer
{
/// <summary>
/// Disc Manufacturer ID
/// </summary>
/// <remarks>6 bytes</remarks>
public byte[]? DiscManufacturerID { get; set; } = new byte[6];
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
public byte[]? DiscManufacturerID;
/// <summary>
/// Media Type ID
/// </summary>
/// <remarks>3 bytes</remarks>
public byte[]? MediaTypeID { get; set; } = new byte[3];
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public byte[]? MediaTypeID;
/// <summary>
/// Time Stamp
/// </summary>
public ushort TimeStamp { get; set; }
public ushort TimeStamp;
/// <summary>
/// Product Revision Number
/// </summary>
public byte ProductRevisionNumber { get; set; }
public byte ProductRevisionNumber;
}
}

72
PKZIP/Archive.cs Normal file
View File

@@ -0,0 +1,72 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// Represents a single ZIP/ZIP64 archive
/// </summary>
/// <remarks>PKZIP archives are meant to be read from the end</remarks>
public class Archive
{
#region Entries, Interleaved
/// <summary>
/// Local file headers, always appear first in each group
/// </summary>
public LocalFileHeader[]? LocalFileHeaders { get; set; }
/// <summary>
/// Encryption headers, may appear second in each group
/// </summary>
/// TODO: Determine the model for the encryption headers
public byte[]?[]? EncryptionHeaders { get; set; }
/// <summary>
/// File data, appears after the encryption header
/// if it exists or after the local file header otherwise
/// </summary>
public byte[][]? FileData { get; set; }
/// <summary>
/// Data descriptors, appears after the file data
/// </summary>
public DataDescriptor?[]? DataDescriptors { get; set; }
/// <summary>
/// ZIP64 Data descriptors, appears after the file data
/// </summary>
public DataDescriptor64?[]? ZIP64DataDescriptors { get; set; }
#endregion
/// <summary>
/// Optional archive decryption header, appears after all entries
/// </summary>
/// TODO: Determine the model
public byte[]? ArchiveDecryptionHeader { get; set; }
/// <summary>
/// Optional archive extra data record, appears after either
/// the archive decryption header or after all entries
/// </summary>
public ArchiveExtraDataRecord? ArchiveExtraDataRecord { get; set; }
/// <summary>
/// Central directory headers in sequential order
/// </summary>
public CentralDirectoryFileHeader[]? CentralDirectoryHeaders { get; set; }
/// <summary>
/// Optional ZIP64 end of central directory record
/// </summary>
public EndOfCentralDirectoryRecord64? ZIP64EndOfCentralDirectoryRecord { get; set; }
/// <summary>
/// Optional ZIP64 end of central directory locator
/// </summary>
public EndOfCentralDirectoryLocator64? ZIP64EndOfCentralDirectoryLocator { get; set; }
/// <summary>
/// Required end of central directory record, always must be last
/// </summary>
public EndOfCentralDirectoryRecord? EndOfCentralDirectoryRecord { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// Archive extra data record
/// </summary>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class ArchiveExtraDataRecord
{
/// <summary>
/// Archive extra data signature (0x08064B50)
/// </summary>
public uint Signature { get; set; }
/// <summary>
/// Extra field length
/// </summary>
public uint ExtraFieldLength { get; set; }
/// <summary>
/// Extra field data (variable size)
/// </summary>
public byte[]? ExtraFieldData { get; set; }
}
}

View File

@@ -0,0 +1,119 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// Central directory file header
/// </summary>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class CentralDirectoryFileHeader
{
/// <summary>
/// Central file header signature (0x02014B50)
/// </summary>
public uint Signature { get; set; }
/// <summary>
/// Host system on which the file attributes are compatible
/// </summary>
public HostSystem HostSystem { get; set; }
/// <summary>
/// ZIP specification version
/// </summary>
public byte VersionMadeBy { get; set; }
/// <summary>
/// Version needed to extract
/// </summary>
/// <remarks>TODO: Add mapping of versions</remarks>
public ushort VersionNeededToExtract { get; set; }
/// <summary>
/// General purpose bit flag
/// </summary>
public GeneralPurposeBitFlags Flags { get; set; }
/// <summary>
/// Compression method
/// </summary>
public CompressionMethod CompressionMethod { get; set; }
/// <summary>
/// Last modified file time
/// </summary>
public ushort LastModifedFileTime { get; set; }
/// <summary>
/// Last modified file date
/// </summary>
public ushort LastModifiedFileDate { get; set; }
/// <summary>
/// CRC-32
/// </summary>
public uint CRC32 { get; set; }
/// <summary>
/// Compressed size
/// </summary>
public uint CompressedSize { get; set; }
/// <summary>
/// Uncompressed size
/// </summary>
public uint UncompressedSize { get; set; }
/// <summary>
/// File name length
/// </summary>
public ushort FileNameLength { get; set; }
/// <summary>
/// Extra field length
/// </summary>
public ushort ExtraFieldLength { get; set; }
/// <summary>
/// File comment length
/// </summary>
public ushort FileCommentLength { get; set; }
/// <summary>
/// Disk number start
/// </summary>
public ushort DiskNumberStart { get; set; }
/// <summary>
/// Internal file attributes
/// </summary>
public InternalFileAttributes InternalFileAttributes { get; set; }
/// <summary>
/// External file attributes
/// </summary>
public uint ExternalFileAttributes { get; set; }
/// <summary>
/// Relative offset of local header
/// </summary>
/// <remarks>
/// If ZIP64 and value is 0xFFFFFFFF, size will be in the
/// extended information extra field
/// </remarks>
public uint RelativeOffsetOfLocalHeader { get; set; }
/// <summary>
/// File name (variable size)
/// </summary>
public string? FileName { get; set; }
/// <summary>
/// Extra field (variable size)
/// </summary>
public byte[]? ExtraField { get; set; }
/// <summary>
/// File comment (variable size)
/// </summary>
public string? FileComment { get; set; }
}
}

85
PKZIP/Constants.cs Normal file
View File

@@ -0,0 +1,85 @@
namespace SabreTools.Models.PKZIP
{
public static class Constants
{
#region Archive Extra Data Record
public const uint ArchiveExtraDataRecordSignature = 0x08064B50;
public static readonly byte[] ArchiveExtraDataRecordSignatureBytes = [0x50, 0x4B, 0x06, 0x08];
public static readonly string ArchiveExtraDataRecordSignatureString = "PK" + (char)0x06 + (char)0x08;
#endregion
#region Central Directory File Header
public const uint CentralDirectoryFileHeaderSignature = 0x02014B50;
public static readonly byte[] CentralDirectoryFileHeaderSignatureBytes = [0x50, 0x4B, 0x01, 0x02];
public static readonly string CentralDirectoryFileHeaderSignatureString = "PK" + (char)0x01 + (char)0x02;
#endregion
#region Data Descriptor
public const uint DataDescriptorSignature = 0x08074B50;
public static readonly byte[] DataDescriptorSignatureBytes = [0x50, 0x4B, 0x07, 0x08];
public static readonly string DataDescriptorSignatureString = "PK" + (char)0x07 + (char)0x08;
#endregion
#region Digital Signature
public const uint DigitalSignatureSignature = 0x05054B50;
public static readonly byte[] DigitalSignatureSignatureBytes = [0x50, 0x4B, 0x05, 0x05];
public static readonly string DigitalSignatureSignatureString = "PK" + (char)0x05 + (char)0x05;
#endregion
#region End of Central Directory Locator (ZIP64)
public const uint EndOfCentralDirectoryLocator64Signature = 0x07064B50;
public static readonly byte[] EndOfCentralDirectoryLocator64SignatureBytes = [0x50, 0x4B, 0x06, 0x07];
public static readonly string EndOfCentralDirectoryLocator64SignatureString = "PK" + (char)0x06 + (char)0x07;
#endregion
#region End of Central Directory Record
public const uint EndOfCentralDirectoryRecordSignature = 0x06054B50;
public static readonly byte[] EndOfCentralDirectoryRecordSignatureBytes = [0x50, 0x4B, 0x05, 0x06];
public static readonly string EndOfCentralDirectoryRecordSignatureString = "PK" + (char)0x05 + (char)0x06;
#endregion
#region End of Central Directory Record (ZIP64)
public const uint EndOfCentralDirectoryRecord64Signature = 0x06064B50;
public static readonly byte[] EndOfCentralDirectoryRecord64SignatureBytes = [0x50, 0x4B, 0x06, 0x06];
public static readonly string EndOfCentralDirectoryRecord64SignatureString = "PK" + (char)0x06 + (char)0x06;
#endregion
#region Local File Header
public const uint LocalFileHeaderSignature = 0x04034B50;
public static readonly byte[] LocalFileHeaderSignatureBytes = [0x50, 0x4B, 0x03, 0x04];
public static readonly string LocalFileHeaderSignatureString = "PK" + (char)0x03 + (char)0x04;
#endregion
}
}

29
PKZIP/DataDescriptor.cs Normal file
View File

@@ -0,0 +1,29 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// Data descriptor
/// </summary>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class DataDescriptor
{
/// <summary>
/// Recommended, but optional, signature (0x08074B50)
/// </summary>
public uint? Signature { get; set; }
/// <summary>
/// CRC-32
/// </summary>
public uint CRC32 { get; set; }
/// <summary>
/// Compressed size
/// </summary>
public uint CompressedSize { get; set; }
/// <summary>
/// Uncompressed size
/// </summary>
public uint UncompressedSize { get; set; }
}
}

29
PKZIP/DataDescriptor64.cs Normal file
View File

@@ -0,0 +1,29 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// Data descriptor (ZIP64)
/// </summary>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class DataDescriptor64
{
/// <summary>
/// Recommended, but optional, signature (0x08074B50)
/// </summary>
public uint? Signature { get; set; }
/// <summary>
/// CRC-32
/// </summary>
public uint CRC32 { get; set; }
/// <summary>
/// Compressed size
/// </summary>
public ulong CompressedSize { get; set; }
/// <summary>
/// Uncompressed size
/// </summary>
public ulong UncompressedSize { get; set; }
}
}

24
PKZIP/DigitalSignature.cs Normal file
View File

@@ -0,0 +1,24 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// Digital signature
/// </summary>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class DigitalSignature
{
/// <summary>
/// Header signature (0x05054B50)
/// </summary>
public uint Signature { get; set; }
/// <summary>
/// Data length
/// </summary>
public ushort DataLength { get; set; }
/// <summary>
/// Signature data (variable size)
/// </summary>
public byte[]? SignatureData { get; set; }
}
}

View File

@@ -0,0 +1,32 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// Zip64 end of central directory locator
/// </summary>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
[StructLayout(LayoutKind.Sequential)]
public class EndOfCentralDirectoryLocator64
{
/// <summary>
/// ZIP64 end of central directory locator signature (0x07064B50)
/// </summary>
public uint Signature;
/// <summary>
/// Number of the disk with the start of the end of central directory
/// </summary>
public uint StartDiskNumber;
/// <summary>
/// Relative offset of start of central directory record
/// </summary>
public ulong CentralDirectoryOffset;
/// <summary>
/// Total number of disks
/// </summary>
public uint TotalDisks;
}
}

View File

@@ -0,0 +1,79 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// End of central directory record
/// </summary>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class EndOfCentralDirectoryRecord
{
/// <summary>
/// End of central directory signature (0x06054B50)
/// </summary>
public uint Signature { get; set; }
/// <summary>
/// Number of this disk
/// </summary>
/// <remarks>
/// If ZIP64 and value is 0xFFFF, size will be in the
/// extended information extra field
/// </remarks>
public ushort DiskNumber { get; set; }
/// <summary>
/// Number of the disk with the start of the central directory
/// </summary>
/// <remarks>
/// If ZIP64 and value is 0xFFFF, size will be in the
/// extended information extra field
/// </remarks>
public ushort StartDiskNumber { get; set; }
/// <summary>
/// Total number of entries in the central directory on this disk
/// </summary>
/// <remarks>
/// If ZIP64 and value is 0xFFFF, size will be in the
/// extended information extra field
/// </remarks>
public ushort TotalEntriesOnDisk { get; set; }
/// <summary>
/// Total number of entries in the central directory
/// </summary>
/// <remarks>
/// If ZIP64 and value is 0xFFFF, size will be in the
/// extended information extra field
/// </remarks>
public ushort TotalEntries { get; set; }
/// <summary>
/// Size of the central directory
/// </summary>
/// <remarks>
/// If ZIP64 and value is 0xFFFFFFFF, size will be in the
/// extended information extra field
/// </remarks>
public uint CentralDirectorySize { get; set; }
/// <summary>
/// Offset of start of central directory with respect to the
/// starting disk number
/// </summary>
/// <remarks>
/// If ZIP64 and value is 0xFFFFFFFF, size will be in the
/// extended information extra field
/// </remarks>
public uint CentralDirectoryOffset { get; set; }
/// <summary>
/// .ZIP file comment length
/// </summary>
public ushort FileCommentLength { get; set; }
/// <summary>
/// .ZIP file comment
/// </summary>
public string? FileComment { get; set; }
}
}

View File

@@ -0,0 +1,72 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// Zip64 end of central directory record
/// </summary>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class EndOfCentralDirectoryRecord64
{
/// <summary>
/// ZIP64 end of central directory signature (0x06064B50)
/// </summary>
public uint Signature { get; set; }
/// <summary>
/// Size of ZIP64 end of central directory record
/// </summary>
/// <remarks>SizeOfFixedFields + SizeOfVariableData - 12</remarks>
public ulong DirectoryRecordSize { get; set; }
/// <summary>
/// Host system on which the file attributes are compatible
/// </summary>
public HostSystem HostSystem { get; set; }
/// <summary>
/// ZIP specification version
/// </summary>
public byte VersionMadeBy { get; set; }
/// <summary>
/// Version needed to extract
/// </summary>
/// <remarks>TODO: Add mapping of versions</remarks>
public ushort VersionNeededToExtract { get; set; }
/// <summary>
/// Number of this disk
/// </summary>
public uint DiskNumber { get; set; }
/// <summary>
/// Number of the disk with the start of the central directory
/// </summary>
public uint StartDiskNumber { get; set; }
/// <summary>
/// Total number of entries in the central directory on this disk
/// </summary>
public ulong TotalEntriesOnDisk { get; set; }
/// <summary>
/// Total number of entries in the central directory
/// </summary>
public ulong TotalEntries { get; set; }
/// <summary>
/// Size of the central directory
/// </summary>
public ulong CentralDirectorySize { get; set; }
/// <summary>
/// Offset of start of central directory with respect to the
/// starting disk number
/// </summary>
public ulong CentralDirectoryOffset { get; set; }
/// <summary>
/// ZIP64 extensible data sector
/// </summary>
public byte[]? ExtensibleDataSector { get; set; }
}
}

719
PKZIP/Enums.cs Normal file
View File

@@ -0,0 +1,719 @@
using System;
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
namespace SabreTools.Models.PKZIP
{
public enum CompressionMethod : ushort
{
/// <summary>
/// The file is stored (no compression)
/// </summary>
Stored = 0,
/// <summary>
/// The file is Shrunk
/// </summary>
Shrunk = 1,
/// <summary>
/// The file is Reduced with compression factor 1
/// </summary>
ReducedCompressionFactor1 = 2,
/// <summary>
/// The file is Reduced with compression factor 2
/// </summary>
ReducedCompressionFactor2 = 3,
/// <summary>
/// The file is Reduced with compression factor 3
/// </summary>
ReducedCompressionFactor3 = 4,
/// <summary>
/// The file is Reduced with compression factor 4
/// </summary>
ReducedCompressionFactor4 = 5,
/// <summary>
/// The file is Imploded
/// </summary>
Implode = 6,
/// <summary>
/// Reserved for Tokenizing compression algorithm
/// </summary>
TokenizingCompressionAlgorithm = 7,
/// <summary>
/// The file is Deflated
/// </summary>
Deflate = 8,
/// <summary>
/// Enhanced Deflating using Deflate64(tm)
/// </summary>
Deflate64 = 9,
/// <summary>
/// PKWARE Data Compression Library Imploding (old IBM TERSE)
/// </summary>
PKWAREDataCompressionLibraryImplode = 10,
/// <summary>
/// Reserved by PKWARE
/// </summary>
CompressionMethod11 = 11,
/// <summary>
/// File is compressed using BZIP2 algorithm
/// </summary>
BZIP2 = 12,
/// <summary>
/// Reserved by PKWARE
/// </summary>
CompressionMethod13 = 13,
/// <summary>
/// LZMA
/// </summary>
LZMA = 14,
/// <summary>
/// Reserved by PKWARE
/// </summary>
CompressionMethod15 = 15,
/// <summary>
/// IBM z/OS CMPSC Compression
/// </summary>
IBMzOSCMPSC = 16,
/// <summary>
/// Reserved by PKWARE
/// </summary>
CompressionMethod17 = 17,
/// <summary>
/// File is compressed using IBM TERSE (new)
/// </summary>
IBMTERSE = 18,
/// <summary>
/// IBM LZ77 z Architecture
/// </summary>
IBMLZ77 = 19,
/// <summary>
/// deprecated (use method 93 for zstd)
/// </summary>
[Obsolete]
OldZstandard = 20,
/// <summary>
/// Zstandard (zstd) Compression
/// </summary>
Zstandard = 93,
/// <summary>
/// MP3 Compression
/// </summary>
MP3 = 94,
/// <summary>
/// XZ Compression
/// </summary>
XZ = 95,
/// <summary>
/// JPEG variant
/// </summary>
JPEGVariant = 96,
/// <summary>
/// WavPack compressed data
/// </summary>
WavPack = 97,
/// <summary>
/// PPMd version I, Rev 1
/// </summary>
PPMdVersionIRev1 = 98,
/// <summary>
/// AE-x encryption marker
/// </summary>
AExEncryption = 99,
}
[Flags]
public enum GeneralPurposeBitFlags : ushort
{
/// <summary>
/// Indicates that the file is encrypted
/// </summary>
FileEncrypted = 0b0000_0000_0000_0001,
#region Compression Method 6 (Implode)
/// <summary>
/// Set - 8K sliding dictionary
/// Clear - 4K sliding dictionary
/// </summary>
LargeSlidingDictionary = 0b0000_0000_0000_0010,
/// <summary>
/// Set - 3 Shannon-Fano trees were used
/// Clear - 2 Shannon-Fano trees were used
/// </summary>
ThreeTrees = 0b0000_0000_0000_0100,
#endregion
#region Compression Method 8 (Deflate)
/// <summary>
/// Normal (-en) compression
/// </summary>
NormalCompression = 0b0000_0000_0000_0000,
/// <summary>
/// Maximum (-ex) compression
/// </summary>
MaximumCompression = 0b0000_0000_0000_0010,
/// <summary>
/// Fast (-ef) compression
/// </summary>
FastCompression = 0b0000_0000_0000_0100,
/// <summary>
/// Super Fast (-es) compression
/// </summary>
SuperFastCompression = 0b0000_0000_0000_0110,
#endregion
#region Compression Method 14 (LZMA)
/// <summary>
/// Set - indicates an end-of-stream (EOS) marker is used to
/// mark the end of the compressed data stream.
/// Clear - an EOS marker is not present and the compressed data
/// size must be known to extract.
/// </summary>
EndOfStreamMarker = 0b0000_0000_0000_0010,
#endregion
/// <summary>
/// set - the fields crc-32, compressed size and
/// uncompressed size are set to zero in the
/// local header. The correct values are put
/// in the data descriptor immediately
/// following the compressed data.
/// </summary>
NoCRC = 0b0000_0000_0000_1000,
/// <summary>
/// Reserved for use with method 8, for enhanced deflating.
/// </summary>
EnhancedDeflateReserved = 0b0000_0000_0001_0000,
/// <summary>
/// Indicates that the file is compressed patched data.
/// </summary>
/// <remarks>Requires PKZIP version 2.70 or greater</remarks>
CompressedPatchedData = 0b0000_0000_0010_0000,
/// <summary>
/// Set - you MUST set the version needed to extract value
/// to at least 50 and you MUST also set bit 0. If AES
/// encryption is used, the version needed to extract
/// value MUST be at least 51.
/// </summary>
StrongEncryption = 0b0000_0000_0100_0000,
/// <summary>
/// Currently unused
/// </summary>
Bit7 = 0b0000_0000_1000_0000,
/// <summary>
/// Currently unused
/// </summary>
Bit8 = 0b0000_0001_0000_0000,
/// <summary>
/// Currently unused
/// </summary>
Bit9 = 0b0000_0010_0000_0000,
/// <summary>
/// Currently unused
/// </summary>
Bit10 = 0b0000_0100_0000_0000,
/// <summary>
/// Set - the filename and comment fields for this
/// file MUST be encoded using UTF-8.
/// </summary>
LanguageEncodingFlag = 0b0000_1000_0000_0000,
/// <summary>
/// Reserved by PKWARE for enhanced compression
/// </summary>
PKWAREEnhancedCompression = 0b0001_0000_0000_0000,
/// <summary>
/// Set - Set when encrypting the Central Directory to
/// indicate selected data values in the Local
/// Header are masked to hide their actual values
/// </summary>
LocalHeaderValuesMasked = 0b0010_0000_0000_0000,
/// <summary>
/// Reserved by PKWARE for alternate streams
/// </summary>
PKWAREAlternateStreams = 0b0100_0000_0000_0000,
/// <summary>
/// Reserved by PKWARE
/// </summary>
PKWAREReserved = 0b1000_0000_0000_0000,
}
public enum HeaderID : ushort
{
/// <summary>
/// Zip64 extended information extra field
/// </summary>
Zip64ExtendedInformation = 0x0001,
/// <summary>
/// AV Info
/// </summary>
AVInfo = 0x0007,
/// <summary>
/// Reserved for extended language encoding data (PFS)
/// </summary>
ExtendedLanguageEncodingData = 0x0008,
/// <summary>
/// OS/2
/// </summary>
OS2 = 0x0009,
/// <summary>
/// NTFS
/// </summary>
NTFS = 0x000A,
/// <summary>
/// OpenVMS
/// </summary>
OpenVMS = 0x000C,
/// <summary>
/// UNIX
/// </summary>
UNIX = 0x000D,
/// <summary>
/// Reserved for file stream and fork descriptors
/// </summary>
FileStreamFork = 0x000E,
/// <summary>
/// Patch Descriptor
/// </summary>
PatchDescriptor = 0x000F,
/// <summary>
/// PKCS#7 Store for X.509 Certificates
/// </summary>
PKCSStore = 0x0014,
/// <summary>
/// X.509 Certificate ID and Signature for individual file
/// </summary>
X509IndividualFile = 0x0015,
/// <summary>
/// X.509 Certificate ID for Central Directory
/// </summary>
X509CentralDirectory = 0x0016,
/// <summary>
/// Strong Encryption Header
/// </summary>
StrongEncryptionHeader = 0x0017,
/// <summary>
/// Record Management Controls
/// </summary>
RecordManagementControls = 0x0018,
/// <summary>
/// PKCS#7 Encryption Recipient Certificate List
/// </summary>
PKCSCertificateList = 0x0019,
/// <summary>
/// Reserved for Timestamp record
/// </summary>
Timestamp = 0x0020,
/// <summary>
/// Policy Decryption Key Record
/// </summary>
PolicyDecryptionKey = 0x0021,
/// <summary>
/// Smartcrypt Key Provider Record
/// </summary>
SmartcryptKeyProvider = 0x0022,
/// <summary>
/// Smartcrypt Policy Key Data Record
/// </summary>
SmartcryptPolicyKeyData = 0x0023,
/// <summary>
/// IBM S/390 (Z390), AS/400 (I400) attributes - uncompressed
/// </summary>
IBMS390AttributesUncompressed = 0x0065,
/// <summary>
/// Reserved for IBM S/390 (Z390), AS/400 (I400) attributes - compressed
/// </summary>
IBMS390AttributesCompressed = 0x0066,
/// <summary>
/// POSZIP 4690 (reserved)
/// </summary>
POSZIP4690 = 0x4690,
#region Third-Party
/// <summary>
/// Macintosh
/// </summary>
Macintosh = 0x07C8,
/// <summary>
/// Pixar USD header ID
/// </summary>
PixarUSD = 0x1986,
/// <summary>
/// ZipIt Macintosh
/// </summary>
ZipItMacintosh = 0x2605,
/// <summary>
/// ZipIt Macintosh 1.3.5+
/// </summary>
ZipItMacintosh135Plus = 0x2705,
/// <summary>
/// ZipIt Macintosh 1.3.5+
/// </summary>
ZipItMacintosh135PlusAlt = 0x2805,
/// <summary>
/// Info-ZIP Macintosh
/// </summary>
InfoZIPMacintosh = 0x334D,
/// <summary>
/// Acorn/SparkFS
/// </summary>
AcornSparkFS = 0x4341,
/// <summary>
/// Windows NT security descriptor (binary ACL)
/// </summary>
WindowsNTSecurityDescriptor = 0x4453,
/// <summary>
/// VM/CMS
/// </summary>
VMCMS = 0x4704,
/// <summary>
/// MVS
/// </summary>
MVS = 0x470F,
/// <summary>
/// THEOS (old?)
/// </summary>
THEOSold = 0x4854,
/// <summary>
/// FWKCS MD5
/// </summary>
FWKCSMD5 = 0x4B46,
/// <summary>
/// OS/2 access control list (text ACL)
/// </summary>
OS2AccessControlList = 0x4C41,
/// <summary>
/// Info-ZIP OpenVMS
/// </summary>
InfoZIPOpenVMS = 0x4D49,
/// <summary>
/// Macintosh Smartzip (??)
/// </summary>
MacintoshSmartzip = 0x4D63,
/// <summary>
/// Xceed original location extra field
/// </summary>
XceedOriginalLocation = 0x4F4C,
/// <summary>
/// AOS/VS (ACL)
/// </summary>
ADSVS = 0x5356,
/// <summary>
/// extended timestamp
/// </summary>
ExtendedTimestamp = 0x5455,
/// <summary>
/// Xceed unicode extra field
/// </summary>
XceedUnicode = 0x554E,
/// <summary>
/// Info-ZIP UNIX (original, also OS/2, NT, etc)
/// </summary>
InfoZIPUNIX = 0x5855,
/// <summary>
/// Info-ZIP Unicode Comment Extra Field
/// </summary>
InfoZIPUnicodeComment = 0x6375,
/// <summary>
/// BeOS/BeBox
/// </summary>
BeOSBeBox = 0x6542,
/// <summary>
/// THEOS
/// </summary>
THEOS = 0x6854,
/// <summary>
/// Info-ZIP Unicode Path Extra Field
/// </summary>
InfoZIPUnicodePath = 0x7075,
/// <summary>
/// AtheOS/Syllable
/// </summary>
AtheOSSyllable = 0x7441,
/// <summary>
/// ASi UNIX
/// </summary>
ASiUNIX = 0x756E,
/// <summary>
/// Info-ZIP UNIX (new)
/// </summary>
InfoZIPUNIXNew = 0x7855,
/// <summary>
/// Info-ZIP UNIX (newer UID/GID)
/// </summary>
InfoZIPUNIXNewer = 0x7875,
/// <summary>
/// Data Stream Alignment (Apache Commons-Compress)
/// </summary>
DataStreamAlignment = 0xA11E,
/// <summary>
/// Microsoft Open Packaging Growth Hint
/// </summary>
MicrosoftOpenPackagingGrowthHint = 0xA220,
/// <summary>
/// Java JAR file Extra Field Header ID
/// </summary>
JavaJAR = 0xCAFE,
/// <summary>
/// Android ZIP Alignment Extra Field
/// </summary>
AndroidZIPAlignment = 0xD935,
/// <summary>
/// Korean ZIP code page info
/// </summary>
KoreanZIPCodePage = 0xE57A,
/// <summary>
/// SMS/QDOS
/// </summary>
SMSQDOS = 0xFD4A,
/// <summary>
/// AE-x encryption structure
/// </summary>
AExEncryptionStructure = 0x9901,
/// <summary>
/// Unknown
/// </summary>
Unknown = 0x9902,
#endregion
}
public enum HostSystem : byte
{
/// <summary>
/// MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems)
/// </summary>
MSDOS = 0,
/// <summary>
/// Amiga
/// </summary>
Amiga = 1,
/// <summary>
/// OpenVMS
/// </summary>
OpenVMS = 2,
/// <summary>
/// UNIX
/// </summary>
UNIX = 3,
/// <summary>
/// VM/CMS
/// </summary>
VMCMS = 4,
/// <summary>
/// Atari ST
/// </summary>
AtariST = 5,
/// <summary>
/// OS/2 H.P.F.S.
/// </summary>
OS2HPFS = 6,
/// <summary>
/// Macintosh
/// </summary>
Macintosh = 7,
/// <summary>
/// Z-System
/// </summary>
ZSystem = 8,
/// <summary>
/// CP/M
/// </summary>
CPM = 9,
/// <summary>
/// Windows NTFS
/// </summary>
WindowsNTFS = 10,
/// <summary>
/// MVS (OS/390 - Z/OS)
/// </summary>
MVS = 11,
/// <summary>
/// VSE
/// </summary>
VSE = 12,
/// <summary>
/// Acorn Risc
/// </summary>
AcornRisc = 13,
/// <summary>
/// VFAT
/// </summary>
VFAT = 14,
/// <summary>
/// alternate MVS
/// </summary>
AlternateVMS = 15,
/// <summary>
/// BeOS
/// </summary>
BeOS = 16,
/// <summary>
/// Tandem
/// </summary>
Tandem = 17,
/// <summary>
/// OS/400
/// </summary>
OS400 = 18,
/// <summary>
/// OS X (Darwin)
/// </summary>
OSX = 19,
// 20 thru 255 - unused
}
[Flags]
public enum InternalFileAttributes : ushort
{
/// <summary>
/// Set - The file is apparently an ASCII or text file
/// Clear - The file is apparently binary data
/// </summary>
ASCII = 0b0000_0000_0000_0001,
/// <summary>
/// Reserved for use by PKWARE
/// </summary>
Bit1 = 0b0000_0000_0000_0010,
/// <summary>
/// Reserved for use by PKWARE
/// </summary>
Bit2 = 0b0000_0000_0000_0100,
/*
4.4.14.2 The 0x0002 bit of this field indicates, if set, that
a 4 byte variable record length control field precedes each
logical record indicating the length of the record. The
record length control field is stored in little-endian byte
order. This flag is independent of text control characters,
and if used in conjunction with text data, includes any
control characters in the total length of the record. This
value is provided for mainframe data transfer support.
*/
}
}

77
PKZIP/LocalFileHeader.cs Normal file
View File

@@ -0,0 +1,77 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// PKZIP local file header
/// </summary>
/// <see href="https://petlibrary.tripod.com/ZIP.HTM"/>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class LocalFileHeader
{
/// <summary>
/// Signature (0x04034B50)
/// </summary>
public uint Signature { get; set; }
/// <summary>
/// Version needed to extract
/// decimal value/10 = major version #
/// decimal value%10 = minor version #
/// </summary>
public ushort Version { get; set; }
/// <summary>
/// General purpose bit flag
/// </summary>
public GeneralPurposeBitFlags Flags { get; set; }
/// <summary>
/// Compression method
/// </summary>
public CompressionMethod CompressionMethod { get; set; }
/// <summary>
/// Last modified file time
/// </summary>
public ushort LastModifedFileTime { get; set; }
/// <summary>
/// Last modified file date
/// </summary>
public ushort LastModifiedFileDate { get; set; }
/// <summary>
/// CRC-32
/// </summary>
public uint CRC32 { get; set; }
/// <summary>
/// Compressed size
/// </summary>
public uint CompressedSize { get; set; }
/// <summary>
/// Uncompressed size
/// </summary>
public uint UncompressedSize { get; set; }
/// <summary>
/// File name length
/// </summary>
public ushort FileNameLength { get; set; }
/// <summary>
/// Extra field length
/// </summary>
public ushort ExtraFieldLength { get; set; }
/// <summary>
/// File name (variable size)
/// </summary>
public string? FileName { get; set; }
/// <summary>
/// Extra field (variable size)
/// </summary>
public byte[]? ExtraField { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
namespace SabreTools.Models.PKZIP
{
/// <summary>
/// Special purpose data for ZIP64 extensible data field
/// </summary>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class SpecialPurposeDataHeader
{
/// <summary>
/// Header ID (data type)
/// </summary>
public HeaderID HeaderID { get; set; }
/// <summary>
/// Data size
/// </summary>
public uint DataSize { get; set; }
/// <summary>
/// Data (variable size)
/// </summary>
/// TODO: Implement models for all extra field types - 4.5.3
public byte[]? Data { get; set; }
}
}

Some files were not shown because too many files have changed in this diff Show More