mirror of
https://github.com/AssetRipper/AssetRipper.Conversions.UnityCrunch.git
synced 2026-11-13 17:07:07 -10:00
20 lines
481 B
C#
20 lines
481 B
C#
namespace AssetRipper.Conversions.UnityCrunch.ConsoleApp;
|
|
|
|
internal static class Program
|
|
{
|
|
private static void Main(string[] args)
|
|
{
|
|
byte[] data = File.ReadAllBytes(args[0]);
|
|
string outputPath = args.Length > 1 ? args[1] : args[0] + ".dxt";
|
|
if (UnityCrunch.TryDecompress(data, out byte[]? output))
|
|
{
|
|
File.WriteAllBytes(outputPath, output);
|
|
Console.WriteLine($"Decompressed to {outputPath}");
|
|
}
|
|
else
|
|
{
|
|
Console.WriteLine("Decompression failed");
|
|
}
|
|
}
|
|
}
|