v4.0
Memory Usage Optimisations
FileFormatInspector
and FileFormat
have been changed to improve memory usage. Instead of buffering the stream into a byte array, the source stream is passed to FileFormat.IsMatch
for the signature to be verified directly.
For formats which need to read the entire stream (OfficeOpenXml
and CompoundFileBinary
derived types) the stream conversion is now cached and shared amongst sibling types which need to inspect the converted value. #22
Dependency Changes
Changed dependency to Open-MCDF. As a consequence support for .NET Standard 1.6 has been removed. #21
Nullable Reference Types
Nullable reference types are now used to help express the design intent. In particular, IFileFormatInspector.DetermineFileFormat
returns FileFormat?
because an unmatched stream will return null
to indicate the format could not be determined.