skyscraper8/skyscraper8/DsmCc/FormatSpecifier.cs
feyris-tan ef86554f9a Import
2025-05-12 22:09:16 +02:00

44 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper.IO;
namespace skyscraper5.DsmCc
{
class FormatSpecifier
{
public FormatSpecifier(MemoryStream ms)
{
ModuleVersion = ms.ReadUInt8();
ModuleId = ms.ReadUInt16BE();
BlockSize = ms.ReadUInt16BE();
ModuleSize = ms.ReadUInt32BE();
CompressionMethod = ms.ReadUInt8();
OriginalSize = ms.ReadUInt32BE();
TimeOut = ms.ReadUInt8();
byte objectKeyLength = ms.ReadUInt8();
ObjectKey = ms.ReadBytes(objectKeyLength);
}
public byte[] ObjectKey { get; private set; }
public byte TimeOut { get; private set; }
public uint OriginalSize { get; private set; }
public byte CompressionMethod { get; private set; }
public uint ModuleSize { get; private set; }
public ushort BlockSize { get; set; }
public ushort ModuleId { get; private set; }
public byte ModuleVersion { get; private set; }
}
}