code: private static boolean isGzipped(File file) throws IOException {
          FileInputStream fileInputStream = new FileInputStream(file);
  
          int head = (fileInputStream.read() & 0xff) | ((fileInputStream.read() << 8 ) & 0xff00 );
  
          return GZIPInputStream.GZIP_MAGIC == head;
      }
docs: Checks if the given file is in GZIP format.
  <p/>
  It checks this by checking the head for the {@link java.util.zip.GZIPInputStream#GZIP_MAGIC} number.
  
  @param file The file to check.
  @return {@code true} if the file is in GZIP format, or {@code false}
  @throws IOException