Running into the problem ymnk/jzlib#9 which was fixed in v1.1.3. It looks like it might be partially worked around by https://github.com/jruby/jruby/commit/32a2f33dc80818b497e20b73a8551094c38106a8 however.