zlib: add sync versions for convenience methods

The user should have an option to run CPU-bound functions synchronously. Zlib is the only case where they don't.

This patch should be considered as a draft or a proof-of-concept. Any directions on how it could be improved will be greatly appreciated.