Skip to content

Commit a781fff

Browse files
committed
Enable full BFPK extraction on all platforms
1 parent f3267f7 commit a781fff

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

BinaryObjectScanner/FileType/BFPK.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
using System.IO;
22
using BinaryObjectScanner.Interfaces;
3-
#if NET462_OR_GREATER || NETCOREAPP
4-
using SharpCompress.Compressors;
5-
using SharpCompress.Compressors.Deflate;
6-
#endif
3+
using SabreTools.Compression.Deflate;
74

85
namespace BinaryObjectScanner.FileType
96
{
@@ -109,14 +106,12 @@ public static bool ExtractFile(SabreTools.Serialization.Wrappers.BFPK item, int
109106
{
110107
fs.Write(data, 0, compressedSize);
111108
}
112-
#if NET462_OR_GREATER || NETCOREAPP
113109
else
114110
{
115111
MemoryStream ms = new MemoryStream(data);
116112
ZlibStream zs = new ZlibStream(ms, CompressionMode.Decompress);
117113
zs.CopyTo(fs);
118114
}
119-
#endif
120115

121116
return true;
122117
}

ExtractionTool/Program.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,9 @@ private static void ExtractFile(string file, string outputDirectory, bool includ
137137
Console.WriteLine("Extracting bzip2 contents");
138138
Console.WriteLine();
139139

140-
#if NET20 || NET35 || NET40 || NET452
141-
Console.WriteLine("Extraction is not supported for this framework!");
142-
Console.WriteLine();
143-
#else
144140
// Extract using the FileType
145141
var bzip2 = new BZip2();
146142
bzip2.Extract(stream, file, outputDirectory, includeDebug: true);
147-
#endif
148143
}
149144

150145
// CFB
@@ -235,14 +230,9 @@ private static void ExtractFile(string file, string outputDirectory, bool includ
235230
Console.WriteLine("Extracting gzip contents");
236231
Console.WriteLine();
237232

238-
#if NET20 || NET35 || NET40 || NET452
239-
Console.WriteLine("Extraction is not supported for this framework!");
240-
Console.WriteLine();
241-
#else
242233
// Extract using the FileType
243234
var gzip = new GZIP();
244235
gzip.Extract(stream, file, outputDirectory, includeDebug: true);
245-
#endif
246236
}
247237

248238
// InstallShield Archive V3 (Z)

0 commit comments

Comments
 (0)