Enable full BFPK extraction on all platforms

This commit is contained in:
Matt Nadareski
2024-12-13 14:19:12 -05:00
parent f3267f7fcf
commit a781fffb39
2 changed files with 1 additions and 16 deletions

View File

@@ -1,9 +1,6 @@
using System.IO;
using BinaryObjectScanner.Interfaces;
#if NET462_OR_GREATER || NETCOREAPP
using SharpCompress.Compressors;
using SharpCompress.Compressors.Deflate;
#endif
using SabreTools.Compression.Deflate;
namespace BinaryObjectScanner.FileType
{
@@ -109,14 +106,12 @@ namespace BinaryObjectScanner.FileType
{
fs.Write(data, 0, compressedSize);
}
#if NET462_OR_GREATER || NETCOREAPP
else
{
MemoryStream ms = new MemoryStream(data);
ZlibStream zs = new ZlibStream(ms, CompressionMode.Decompress);
zs.CopyTo(fs);
}
#endif
return true;
}

View File

@@ -137,14 +137,9 @@ namespace ExtractionTool
Console.WriteLine("Extracting bzip2 contents");
Console.WriteLine();
#if NET20 || NET35 || NET40 || NET452
Console.WriteLine("Extraction is not supported for this framework!");
Console.WriteLine();
#else
// Extract using the FileType
var bzip2 = new BZip2();
bzip2.Extract(stream, file, outputDirectory, includeDebug: true);
#endif
}
// CFB
@@ -235,14 +230,9 @@ namespace ExtractionTool
Console.WriteLine("Extracting gzip contents");
Console.WriteLine();
#if NET20 || NET35 || NET40 || NET452
Console.WriteLine("Extraction is not supported for this framework!");
Console.WriteLine();
#else
// Extract using the FileType
var gzip = new GZIP();
gzip.Extract(stream, file, outputDirectory, includeDebug: true);
#endif
}
// InstallShield Archive V3 (Z)