+ * Answers true if the filename (or URL) has a format which Jalview recognises
+ * as denoting gzipped content.
+ * <p>
+ * Currently this means having a ".gz" extension, or ending in "/gzipped" or
+ * "?gz=1" (used to retrieve gzipped from Pfam and Rfam respectively).
+ *
+ * @param filename
+ * @return
+ */
+ protected static boolean isGzipped(String filename)
+ {
+ if (filename == null)
+ {
+ return false;
+ }
+ String lower = filename.toLowerCase();
+ return lower.endsWith(GZ_EXT) || lower.endsWith(Pfam.GZIPPED)
+ || lower.endsWith(Rfam.GZIPPED);
+ }
+
+ /**