From e51091509821c5d52bbff0cbc16afc0409900f5f Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 10 Sep 2021 16:15:20 -0700 Subject: [PATCH] Add note about streams --- BurnOutSharp/FileType/Executable.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BurnOutSharp/FileType/Executable.cs b/BurnOutSharp/FileType/Executable.cs index d77c7607..0a3dd26b 100644 --- a/BurnOutSharp/FileType/Executable.cs +++ b/BurnOutSharp/FileType/Executable.cs @@ -89,6 +89,12 @@ namespace BurnOutSharp.FileType if (stream.CanSeek) stream.Seek(0, SeekOrigin.Begin); + // TODO: Start moving toward reading from the stream directly. In theory, + // deserialization can be done at this point, and if all of the sections are populated + // properly, nearly all of the content checks can be dealt with without having + // to take up as much memory as it does right now reading into the fileContent + // byte array + // Create PortableExecutable and NewExecutable objects for use in the checks PortableExecutable pex = PortableExecutable.Deserialize(fileContent, 0); NewExecutable nex = NewExecutable.Deserialize(fileContent, 0);