docs: public static OutputStream getFileOutputStream(String filename) throws IOException {
      OutputStream out = new FileOutputStream(filename);
      if (filename.endsWith(".gz")) {
        out = new GZIPOutputStream(out);
      } else if (filename.endsWith(".bz2")) {
        //out = new CBZip2OutputStream(out);
        out = getBZip2PipedOutputStream(filename);
      }
      return out;
    }