2020-08-11 12:15:03 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Wabbajack.Common.Serialization.Json;
|
|
|
|
|
using File = Alphaleonis.Win32.Filesystem.File;
|
|
|
|
|
|
|
|
|
|
namespace Compression.BSA
|
|
|
|
|
{
|
|
|
|
|
[JsonName("BSAState")]
|
|
|
|
|
public class BSAStateObject : ArchiveStateObject
|
|
|
|
|
{
|
2020-08-11 15:28:25 +00:00
|
|
|
|
public string Magic { get; set; } = string.Empty;
|
2020-08-11 12:15:03 +00:00
|
|
|
|
public uint Version { get; set; }
|
|
|
|
|
public uint ArchiveFlags { get; set; }
|
|
|
|
|
public uint FileFlags { get; set; }
|
|
|
|
|
|
|
|
|
|
public BSAStateObject()
|
2020-08-11 15:28:25 +00:00
|
|
|
|
{
|
2020-08-11 12:15:03 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public BSAStateObject(BSAReader bsaReader)
|
|
|
|
|
{
|
|
|
|
|
Magic = bsaReader._magic;
|
|
|
|
|
Version = (uint)bsaReader.HeaderType;
|
|
|
|
|
ArchiveFlags = (uint)bsaReader.ArchiveFlags;
|
|
|
|
|
FileFlags = (uint)bsaReader.FileFlags;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task<IBSABuilder> MakeBuilder(long size)
|
|
|
|
|
{
|
|
|
|
|
return await BSABuilder.Create(this, size).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|