diff --git a/DgfTxmConvert/DgfTxmConvert.csproj b/DgfTxmConvert/DgfTxmConvert.csproj
index 3204f83..0935a49 100755
--- a/DgfTxmConvert/DgfTxmConvert.csproj
+++ b/DgfTxmConvert/DgfTxmConvert.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp3.1
+ net6.0
@@ -18,7 +18,16 @@
..\..\LibDgf\LibDgf.Graphics\bin\Debug\netstandard2.0\LibDgf.Graphics.dll
+
+
+
+
+
+
+ ..\..\AuroraLib.Compression\src\AuroraLib.Compression\bin\Debug\net6.0\AuroraLib.Compression.dll
+
+
diff --git a/DgfTxmConvert/Program.cs b/DgfTxmConvert/Program.cs
index c3c130b..efad372 100755
--- a/DgfTxmConvert/Program.cs
+++ b/DgfTxmConvert/Program.cs
@@ -16,8 +16,10 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
-using System.IO.Pipes;
using System.Text;
+using AuroraLib.Compression;
+using AuroraLib.Compression.Algorithms;
+
using Path = System.IO.Path;
namespace DgfTxmConvert
@@ -77,6 +79,24 @@ namespace DgfTxmConvert
DecompressDat(datPathArg.Value, outBaseArg.Value);
});
});
+
+ app.Command("allz-compressor", config =>
+ {
+ config.FullName = "Compress file with ALLZ";
+ config.Description = "Converts flat file to compressed.";
+
+ var datPathArg = config.Argument("datPath", "Path of the file to compress").IsRequired();
+ datPathArg.Accepts().ExistingFile();
+ var outPathArg = config.Argument("outBase", "Path of the output file");
+ outPathArg.Accepts().LegalFilePath();
+
+ config.HelpOption();
+
+ config.OnExecute(() =>
+ {
+ AllzCompressor(datPathArg.Value, outPathArg.Value);
+ });
+ });
app.Command("convert-txm", config =>
{
@@ -354,6 +374,17 @@ namespace DgfTxmConvert
}
}
+
+
+ static void AllzCompressor(string datPathArg, string outPathArg = null)
+ {
+ if (outPathArg == null)
+ outPathArg = Path.GetFullPath(datPathArg) + $"/output.dat";
+
+ using Stream sourceStr = File.OpenRead(datPathArg);
+ using var destStr = File.Create(outPathArg);
+ new ALLZ().Compress(sourceStr, destStr);
+ }
static void ConvertDat(string path, string outBase = null)
{