src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
@SuppressWarnings("unchecked")
    public static Collection<String> parseCompressionMethods(
            Element compressionEl) throws IOException, XmlPullParserException {
        List<Element> methodsEls = compressionEl.elements("method");
        List<String> methodsStr = new LinkedList<String>();
        for (Element methodEl : methodsEls) {
            methodsStr.add(methodEl.getText());
        }
        return methodsStr;
    }
@SuppressWarnings("unchecked")
    public static Collection<String> parseCompressionMethods(
            Element compressionEl) throws IOException, XmlPullParserException {
        List<Element> methodsEls = compressionEl.elements("method");
        List<String> methodsStr = new LinkedList<String>();
        for (Element methodEl : methodsEls) {
            methodsStr.add(methodEl.getText());
        }
        return methodsStr;
    }
@ SuppressWarnings ( "unchecked" ) public static Collection < String > parseCompressionMethods ( Element compressionEl ) throws IOException , XmlPullParserException { List < Element > methodsEls = compressionEl . elements ( "method" ) ; List < String > methodsStr = new LinkedList < String > ( ) ; for ( Element methodEl : methodsEls ) { methodsStr . add ( methodEl . getText ( ) ) ; } return methodsStr ; }
Parse the available compression methods reported from the server.

@param compressionEl
the XML parser, positioned at the start of the compression
stanza.
@return a collection of Stings with the methods included in the
compression stanza.
@throws Exception
if an exception occurs while parsing the stanza.
Parse the available compression methods reported from the server .