title: How can I identify a file type from a blob/filestream?
body: <p>We bought an "off the shelf" application a lonnng time ago that is capable of storing files as a blob within SQL Server.  We've noticed that the database has more than doubled in size within the past six months due to more frequent usage of this blob field by one department.  As a result, the application has become painfully slow.  </p>
  
  <p>I've been tasked with removing the blob field from the database and saving the file onto the actual file system.  Unfortunately, the application does not store what the file type is within the database.  Although I can read the file as it exists in the database, I don't know what extension to save the file as.  The application's support desk no longer supports this version of the software and will not talk to us about extracting the data.  Unfortunately, we do not have access to their source code.</p>
  
  <p>Any suggestions would be greatly appreciated!  Thanks in advance!</p>