On server (C++), binary data is compressed using ZLib function:
ZLib
compress2()
and it\'s sent over to client (Java). On client side (
InflaterInputStream is expecting raw deflate data (RFC 1951), whereas compress2() is producing zlib-wrapped deflate data (RFC 1950 around RFC 1951).
Inflater on the other hand does process zlib-wrapped data (unless you give it the nowrap option). Go figure.
nowrap