Add CHD to factory

This commit is contained in:
Matt Nadareski
2024-10-31 12:09:36 -04:00
parent 88479f674b
commit a2c065bdf2
2 changed files with 13 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ namespace SabreTools.Serialization.Wrappers
case WrapperType.BSP: return BSP.Create(data);
case WrapperType.BZip2: return null; // TODO: Implement wrapper
case WrapperType.CFB: return CFB.Create(data);
case WrapperType.CHD: return CHD.Create(data);
case WrapperType.CIA: return CIA.Create(data);
case WrapperType.Executable: return CreateExecutableWrapper(data);
case WrapperType.GCF: return GCF.Create(data);
@@ -218,6 +219,13 @@ namespace SabreTools.Serialization.Wrappers
#endregion
#region CHD
if (magic.StartsWith(new byte?[] { 0x4D, 0x43, 0x6F, 0x6D, 0x70, 0x72, 0x48, 0x44 }))
return WrapperType.CHD;
#endregion
#region CIA
if (extension.Equals("cia", StringComparison.OrdinalIgnoreCase))

View File

@@ -41,6 +41,11 @@ namespace SabreTools.Serialization.Wrappers
/// </summary>
CFB,
/// <summary>
/// MAME Compressed Hunks of Data
/// </summary>
CHD,
/// <summary>
/// CTR Importable Archive
/// </summary>