1
0
mirror of synced 2025-01-31 04:13:51 +01:00

Fix LZ4F decompression in menu

This commit is contained in:
KillzXGaming 2019-03-24 20:19:40 -04:00
parent cba330d41d
commit ba760057dd
4 changed files with 7 additions and 1 deletions

Binary file not shown.

View File

@ -115,7 +115,13 @@ namespace Switch_Toolbox.Library.IO
SaveFileForCompression(STLibraryCompression.ZSTD.Decompress(data));
break;
case CompressionType.Lz4f:
SaveFileForCompression(STLibraryCompression.Type_LZ4F.Decompress(data));
using (var reader = new FileReader(data))
{
reader.Position = 0;
int OuSize = reader.ReadInt32();
int InSize = data.Length - 4;
SaveFileForCompression(STLibraryCompression.Type_LZ4F.Decompress(reader.getSection(4, InSize)));
}
break;
case CompressionType.Lz4:
SaveFileForCompression(STLibraryCompression.Type_LZ4.Decompress(data));