title: How to detect type of compression used on the file? (if no file extension is specified)
body: <p>How can one detect the type of compression used on the file? (assuming that .zip, .gz, .xz or any other extension is not specified).</p>
  
  <p>Is this information stored somewhere in the header of that file?</p>