Are zlib.compress on Python and Deflater.deflate on Java (Android) compatible?
问题 I am porting a Python application to Android and, at some point, this application has to communicate with a Web Service, sending it compressed data. In order to do that it uses the next method: def stuff(self, data): "Convert into UTF-8 and compress." return zlib.compress(simplejson.dumps(data)) I am using the next method to try to emulate this behavior in Android: private String compressString(String stringToCompress) { Log.i(TAG, "Compressing String " + stringToCompress); byte[] input =