zlib: ability to supply options with convenience methods

This change allows optionally supplying options to the zlib classes using the convenience methods.

Based on this previously attempted pull request: #4400

Thanks!