diff --git a/BurnOutSharp/Tools/Utilities.cs b/BurnOutSharp/Tools/Utilities.cs
index 421992c2..53b3512c 100644
--- a/BurnOutSharp/Tools/Utilities.cs
+++ b/BurnOutSharp/Tools/Utilities.cs
@@ -278,6 +278,9 @@ namespace BurnOutSharp.Tools
if (magic.StartsWith(new byte?[] { 0x4d, 0x50, 0x51, 0x1a }))
return SupportedFileType.MPQ;
+ if (magic.StartsWith(new byte?[] { 0x4d, 0x50, 0x51, 0x1b }))
+ return SupportedFileType.MPQ;
+
#endregion
#region MSI
diff --git a/Test/Program.cs b/Test/Program.cs
index efa95b0e..722389be 100644
--- a/Test/Program.cs
+++ b/Test/Program.cs
@@ -292,6 +292,19 @@ namespace Test
}
}
+ // MoPaQ (MPQ) archive
+ else if (IsMoPaQ(magic))
+ {
+ // Build the archive information
+ Console.WriteLine("Creating MoPaQ deserializer");
+ Console.WriteLine();
+
+ // TODO: Write and use printing methods
+ Console.WriteLine("MoPaQ archive printing not currently enabled");
+ Console.WriteLine();
+ return;
+ }
+
// MS-CAB archive
else if (IsMSCAB(magic))
{
@@ -321,6 +334,17 @@ namespace Test
}
}
+ ///
+ /// Determine if the magic bytes indicate an MoPaQ archive
+ ///
+ private static bool IsMoPaQ(byte[] magic)
+ {
+ if (magic == null || magic.Length < 4)
+ return false;
+
+ return magic[0] == 'M' && magic[1] == 'P' && magic[2] == 'Q' && (magic[3] == 0x1A || magic[3] == 0x1B);
+ }
+
///
/// Determine if the magic bytes indicate an MS-CAB archive
///