Add more optimized marshallers.

This commit is contained in:
2019-02-27 08:49:42 +00:00
parent bfe254279c
commit 45be793491
58 changed files with 593 additions and 382 deletions

View File

@@ -37,6 +37,7 @@ using DiscImageChef.CommonTypes;
using DiscImageChef.CommonTypes.Interfaces;
using DiscImageChef.Console;
using Schemas;
using Marshal = DiscImageChef.Helpers.Marshal;
namespace DiscImageChef.Filesystems
{
@@ -56,7 +57,7 @@ namespace DiscImageChef.Filesystems
if(imagePlugin.Info.SectorSize < 256) return false;
byte[] sector = imagePlugin.ReadSector(partition.Start);
LifSystemBlock lifSb = BigEndianMarshal.ByteArrayToStructureBigEndian<LifSystemBlock>(sector);
LifSystemBlock lifSb = Marshal.ByteArrayToStructureBigEndian<LifSystemBlock>(sector);
DicConsole.DebugWriteLine("LIF plugin", "magic 0x{0:X8} (expected 0x{1:X8})", lifSb.magic, LIF_MAGIC);
return lifSb.magic == LIF_MAGIC;
@@ -71,7 +72,7 @@ namespace DiscImageChef.Filesystems
if(imagePlugin.Info.SectorSize < 256) return;
byte[] sector = imagePlugin.ReadSector(partition.Start);
LifSystemBlock lifSb = BigEndianMarshal.ByteArrayToStructureBigEndian<LifSystemBlock>(sector);
LifSystemBlock lifSb = Marshal.ByteArrayToStructureBigEndian<LifSystemBlock>(sector);
if(lifSb.magic != LIF_MAGIC) return;