diff --git a/BinaryObjectScanner/FileType/MicrosoftCAB.cs b/BinaryObjectScanner/FileType/MicrosoftCAB.cs
index fda63a84..0f1a1139 100644
--- a/BinaryObjectScanner/FileType/MicrosoftCAB.cs
+++ b/BinaryObjectScanner/FileType/MicrosoftCAB.cs
@@ -142,7 +142,6 @@ namespace BinaryObjectScanner.FileType
/// Filename for one cabinet in the set, if available
/// Path to the output directory
/// True to include debug data, false otherwise
- /// Indicates if decompression should be done forward-only
/// Indicates if all files were able to be extracted
/// TODO: Remove once Serialization is updated
private static bool ExtractCabinet(SabreTools.Serialization.Wrappers.MicrosoftCabinet cabArchive, string? filename, string outDir, bool forwardOnly, bool includeDebug)
@@ -157,7 +156,7 @@ namespace BinaryObjectScanner.FileType
for (int f = 0; f < cabArchive.Model.Folders.Length; f++)
{
var folder = cabArchive.Model.Folders[f];
- ExtractFolder(cabArchive, filename, outDir, folder, f, forwardOnly, includeDebug);
+ ExtractFolder(cabArchive, filename, outDir, folder, f, includeDebug);
}
return true;
@@ -176,7 +175,6 @@ namespace BinaryObjectScanner.FileType
/// Path to the output directory
/// Folder containing the blocks to decompress
/// Index of the folder in the cabinet
- /// Indicates if decompression should be done forward-only
/// True to include debug data, false otherwise
/// TODO: Remove once Serialization is updated
private static void ExtractFolder(SabreTools.Serialization.Wrappers.MicrosoftCabinet cabArchive,
@@ -184,11 +182,10 @@ namespace BinaryObjectScanner.FileType
string outDir,
CFFOLDER? folder,
int folderIndex,
- bool forwardOnly,
bool includeDebug)
{
// Decompress the blocks, if possible
- using var blockStream = DecompressBlocks(cabArchive, filename, folder, folderIndex, forwardOnly);
+ using var blockStream = DecompressBlocks(cabArchive, filename, folder, folderIndex);
if (blockStream == null || blockStream.Length == 0)
return;
@@ -235,15 +232,12 @@ namespace BinaryObjectScanner.FileType
/// Filename for one cabinet in the set, if available
/// Folder containing the blocks to decompress
/// Index of the folder in the cabinet
- /// Indicates if decompression should be done forward-only
/// Stream representing the decompressed data on success, null otherwise
/// TODO: Remove once Serialization is updated
- private static Stream? DecompressBlocks(SabreTools.Serialization.Wrappers.MicrosoftCabinet cabArchive, string? filename, CFFOLDER? folder, int folderIndex, bool forwardOnly)
+ private static Stream? DecompressBlocks(SabreTools.Serialization.Wrappers.MicrosoftCabinet cabArchive, string? filename, CFFOLDER? folder, int folderIndex)
{
// Ensure data blocks
- var dataBlocks = forwardOnly
- ? GetDataBlocksForward(cabArchive, filename, folder, folderIndex)
- : GetDataBlocks(cabArchive, filename, folder, folderIndex);
+ var dataBlocks = GetDataBlocks(cabArchive, filename, folder, folderIndex);
if (dataBlocks == null || dataBlocks.Length == 0)
return null;
@@ -375,17 +369,6 @@ namespace BinaryObjectScanner.FileType
return [.. prevBlocks, .. folder.DataBlocks, .. nextBlocks];
}
- ///
- /// Get the set of data blocks for a folder using forward reading only
- ///
- /// Filename for one cabinet in the set, if available
- /// Folder containing the blocks to decompress
- /// Index of the folder in the cabinet
- /// Array of data blocks on success, null otherwise
- /// TODO: Remove once Serialization is updated
- private static CFDATA[]? GetDataBlocksForward(SabreTools.Serialization.Wrappers.MicrosoftCabinet cabArchive, string? filename, CFFOLDER? folder, int folderIndex)
- => GetDataBlocks(cabArchive, filename, folder, folderIndex, skipPrev: true, skipNext: false);
-
///
/// Get all files for the current folder index
///