mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-24 07:03:09 +00:00
Enable full BFPK extraction on all platforms
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user