- // The check only outputs a debug message, because it triggers
- // a bug in compaq cxx 6.2, where is_open() returns 'true' for a
- // fresh new filebuf. (JMarc)
- if (compressed) {
+ // Check the format of the file.
+ string const format = getExtFromContents(filename);
+
+ if (format == "gzip" || format == "zip" || format == "compress") {