mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Can re-encode my complete SSE .bsa test folder
This commit is contained in:
parent
39e1a20741
commit
0957f3cbf9
@ -10,11 +10,19 @@ namespace Compression.BSA.Test
|
||||
class Program
|
||||
{
|
||||
const string TestDir = "c:\\Mod Organizer 2\\mods";
|
||||
const string TempDir = "c:\\tmp\\out";
|
||||
static void Main(string[] args)
|
||||
{
|
||||
foreach (var bsa in Directory.EnumerateFiles(TestDir, "*.bsa", SearchOption.AllDirectories).Skip(2))
|
||||
foreach (var bsa in Directory.EnumerateFiles(TestDir, "*.bsa", SearchOption.AllDirectories).Skip(16))
|
||||
{
|
||||
Console.WriteLine($"From {bsa}");
|
||||
Console.WriteLine("Cleaning Output Dir");
|
||||
if (Directory.Exists(TempDir))
|
||||
{
|
||||
Directory.Delete(TempDir, true);
|
||||
}
|
||||
Directory.CreateDirectory(TempDir);
|
||||
|
||||
using (var a = new BSAReader(bsa))
|
||||
{
|
||||
|
||||
@ -45,6 +53,7 @@ namespace Compression.BSA.Test
|
||||
|
||||
w.Build("c:\\tmp\\built.bsa");
|
||||
|
||||
// Sanity Checks
|
||||
Equal(a.Files.Count(), w.Files.Count());
|
||||
Equal(a.Files.Select(f => f.Path).ToHashSet(), w.Files.Select(f => f.Path).ToHashSet());
|
||||
|
||||
|
@ -336,10 +336,6 @@ namespace Compression.BSA
|
||||
var original_size = rdr.ReadUInt32();
|
||||
if (_bsa.HeaderType == VersionType.SSE)
|
||||
{
|
||||
var settings = new LZ4DecoderSettings()
|
||||
{
|
||||
ExtraMemory = 1024 * 1024 * 8
|
||||
};
|
||||
var r = LZ4Stream.Decode(rdr.BaseStream);
|
||||
r.CopyTo(output);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user