Search code examples
javaandroidcompressionxmppsmack

Has anyone gotten compression to work with ASmack


I am using asmack xmpp client in an android app I am working on and would like to use compression. Ive found the setCompressionEnabled but when I try it it tells me I need smackx.

ConnectionConfiguration config = new ConnectionConfiguration("ip", 5222, "service");
config.setCompressionEnabled(true);
xmpp = new XMPPConnection(config);

After doing some research into the source it seems it only needs the compression classes from the smackx.jar. Even after taking all of the necessary classes in the jar and building them in my project, it does not seem to transfer or receive data. I dont get an error at any point.

I was wondering if anyone has gotten it to work or if I should begin combing through the asmack source.


Solution

  • If anyone runs into this issue in the future you need to bring all the files in from this directory

    http://www.google.com/codesearch/p?hl=en#yyB_8MyGHIo/plugins/FTP/tags/release-0-9-5/com/jcraft/jzlib/ZInputStream.java&q=ZInputStream&sa=N&cd=1&ct=rc

    There doesnt seem to be a jar out there that runs on android and has these files, so just bring them in one at a time with the proper package name. The problem was I was missing a file, so make sure you bring them all in.