code: private static XMPPInputOutputStream maybeGetCompressionHandler(Compress.Feature compression) {
          for (XMPPInputOutputStream handler : SmackConfiguration.getCompressionHandlers()) {
                  String method = handler.getCompressionMethod();
                  if (compression.getMethods().contains(method))
                      return handler;
          }
          return null;
      }
docs: Returns the compression handler that can be used for one compression methods offered by the server.
  
  @return a instance of XMPPInputOutputStream or null if no suitable instance was found