1
0
mirror of synced 2025-01-31 20:25:23 +01:00

Force decompression for bin.gz files

This commit is contained in:
KillzXGaming 2019-09-03 19:32:20 -04:00
parent ebd7870c96
commit d5b9de852d

View File

@ -65,7 +65,7 @@ namespace FirstPlugin
{ {
reader.ByteOrder = Syroot.BinaryData.ByteOrder.BigEndian; reader.ByteOrder = Syroot.BinaryData.ByteOrder.BigEndian;
uint unk = reader.ReadUInt32(); uint unk = reader.ReadUInt32();
if (unk == 65536) try
{ {
uint chunkCount = reader.ReadUInt32(); uint chunkCount = reader.ReadUInt32();
uint unk2 = reader.ReadUInt32(); uint unk2 = reader.ReadUInt32();
@ -98,6 +98,10 @@ namespace FirstPlugin
//Return the decompressed stream with all chunks combined //Return the decompressed stream with all chunks combined
return new MemoryStream(Utils.CombineByteArray(DecompressedChunks.ToArray())); return new MemoryStream(Utils.CombineByteArray(DecompressedChunks.ToArray()));
} }
catch
{
}
} }
return stream; return stream;
} }
@ -105,9 +109,12 @@ namespace FirstPlugin
public void Load(Stream stream) public void Load(Stream stream)
{ {
stream = CheckCompression(stream); stream = CheckCompression(stream);
stream.ExportToFile(FilePath + ".dec");
using (var reader = new FileReader(stream)) using (var reader = new FileReader(stream))
{ {
CheckEndianness(reader); CheckEndianness(reader);
reader.SetByteOrder(true);
uint Count = reader.ReadUInt32(); uint Count = reader.ReadUInt32();