title: Detect if a given file is gzip or TarGzip
body: <p>Given a file, using the magic sequence, I can detect with compression type it belongs to.
  But magic sequence for gzip and tarGzip is the same.
  So, how can I differentiate between these 2 file types.</p>
  <p>On <a href="https://en.wikipedia.org/wiki/List_of_file_signatures" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/List_of_file_signatures</a> , we can see that the file signature for both these files is hexadecimal <strong>1f 8b</strong></p>