Skip to content

Releases: neilharvey/FileSignatures

v4.0.1

10 Aug 19:49
Compare
Choose a tag to compare

Updates OpenMcdf to latest version.

v4.0

13 Nov 22:06
740bb4e
Compare
Choose a tag to compare

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.

v3.0.1

26 Sep 12:37
Compare
Choose a tag to compare

Fixed a NullReferenceException when matching a invalid zip archive.

v3.0

25 Feb 21:30
Compare
Choose a tag to compare

FileFormat now accepts an offset parameter which can be used to determine formats which have a signature that is not at the start of the file.

The CompoundFileBinary format has been rewritten to use the storage identifier in the root entry of the file, because the CLSID is not set in all instances.

Support for the following formats has been added:

  • Open Document Text
  • Open Document Spreadsheet
  • Open Document Presentation
  • DICOM
  • Visio

v2.0

27 Oct 20:06
Compare
Choose a tag to compare

Rewrote all legacy Office formats (doc, xls, ppt, etc.) to use a check based on the Compound File Binary header, instead of using a sub-header signature check. This provides more accurate detection when the CFB root directory position is not the first sector.

Added support for Outlook messages based on the CFB format.

Fixed an IndexOutOfRangeException when the stream being checked is empty.

v1.3

06 Jul 12:13
Compare
Choose a tag to compare

FileFormatInspector now resets the stream back to it's original position.

For non-seekable streams, a NotSupportedException will now be thrown to avoid the stream being consumed. In these instances, create a copy of the stream (for instance copy it into a MemoryStream) before passing the copy into FileFormatInspector.

v1.2

14 Jul 12:30
Compare
Choose a tag to compare

Added support for .NET Framework 4.5.2

v1.1

02 Feb 08:37
Compare
Choose a tag to compare

Corrected the JPEG format so that all types of JPEG files are detected.

The base Jpeg format will now match any type of JPEG file using the SIO (start of image) header FF D8, and subclasses have been added to match the JFIF, SPIFF and EXIF formats.