mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Compression.BSA nullable enabled. Some heavy files disabled
This commit is contained in:
parent
a6169988c1
commit
56fe093618
@ -8,6 +8,7 @@ using System.Threading.Tasks;
|
||||
using ICSharpCode.SharpZipLib.Zip.Compression;
|
||||
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
|
||||
using Wabbajack.Common;
|
||||
#nullable disable
|
||||
|
||||
namespace Compression.BSA
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ using ICSharpCode.SharpZipLib.Zip.Compression;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Common.Serialization.Json;
|
||||
using File = Alphaleonis.Win32.Filesystem.File;
|
||||
#nullable disable
|
||||
|
||||
namespace Compression.BSA
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ using K4os.Compression.LZ4.Streams;
|
||||
using Wabbajack.Common;
|
||||
using File = Alphaleonis.Win32.Filesystem.File;
|
||||
using Path = Alphaleonis.Win32.Filesystem.Path;
|
||||
#nullable disable
|
||||
|
||||
namespace Compression.BSA
|
||||
{
|
||||
|
@ -18,8 +18,8 @@ namespace Compression.BSA
|
||||
internal AbsolutePath _fileName;
|
||||
internal uint _folderCount;
|
||||
internal uint _folderRecordOffset;
|
||||
private Lazy<FolderRecord[]> _folders;
|
||||
internal string _magic;
|
||||
private Lazy<FolderRecord[]> _folders = null!;
|
||||
internal string _magic = string.Empty;
|
||||
internal uint _totalFileNameLength;
|
||||
internal uint _totalFolderNameLength;
|
||||
|
||||
|
@ -10,13 +10,13 @@ namespace Compression.BSA
|
||||
[JsonName("BSAState")]
|
||||
public class BSAStateObject : ArchiveStateObject
|
||||
{
|
||||
public string Magic { get; set; }
|
||||
public string Magic { get; set; } = string.Empty;
|
||||
public uint Version { get; set; }
|
||||
public uint ArchiveFlags { get; set; }
|
||||
public uint FileFlags { get; set; }
|
||||
|
||||
public BSAStateObject()
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
public BSAStateObject(BSAReader bsaReader)
|
||||
@ -25,7 +25,6 @@ namespace Compression.BSA
|
||||
Version = (uint)bsaReader.HeaderType;
|
||||
ArchiveFlags = (uint)bsaReader.ArchiveFlags;
|
||||
FileFlags = (uint)bsaReader.FileFlags;
|
||||
|
||||
}
|
||||
|
||||
public override async Task<IBSABuilder> MakeBuilder(long size)
|
||||
|
@ -13,11 +13,11 @@ namespace Compression.BSA
|
||||
{
|
||||
internal readonly BSAReader BSA;
|
||||
private readonly ReadOnlyMemorySlice<byte> _data;
|
||||
internal Lazy<FileRecord[]> _files;
|
||||
internal Lazy<FileRecord[]> _files = null!;
|
||||
private int _prevFileCount;
|
||||
internal FileNameBlock FileNameBlock;
|
||||
internal FileNameBlock FileNameBlock = null!;
|
||||
internal int Index { get; }
|
||||
public string Name { get; private set; }
|
||||
public string? Name { get; private set; }
|
||||
|
||||
public IEnumerable<IFile> Files => _files.Value;
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
<Platforms>x64</Platforms>
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<Version>3.0</Version>
|
||||
<Nullable>enable</Nullable>
|
||||
<WarningsAsErrors>nullable</WarningsAsErrors>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
</PropertyGroup>
|
||||
|
@ -6,7 +6,7 @@ namespace Compression.BSA
|
||||
{
|
||||
public interface IFolder
|
||||
{
|
||||
string Name { get; }
|
||||
string? Name { get; }
|
||||
IEnumerable<IFile> Files { get; }
|
||||
int FileCount { get; }
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Common.Serialization.Json;
|
||||
#nullable disable
|
||||
|
||||
namespace Compression.BSA
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user