Could it be that your java side is expecting the new zlib format?
As could be seen in your first post, you are using -MAX_WBITS, which
enables old (headerless? don't know what it's called) zlib format, that
has no gzip header and no checksum. Maybe you should be using +MAX_WBITS
(the default), which adds necessary header and checksum.
Posted via http://www.yqcomputer.com/