code: public static XElement parseXMLGZ(File file) throws XMLStreamException {
          try (GZIPInputStream gin = new GZIPInputStream(new BufferedInputStream(new FileInputStream(file), 64 * 1024))) {
              return parseXML(gin);
          } catch (IOException ex) {
              throw new XMLStreamException(ex);
          }
      }
docs: Parse an XML file compressed by GZIP.
  @param file the file
  @return the parsed XML
  @throws XMLStreamException on error