Add deflate/inflate helper functions.

These functions support zlib’s deflate and inflate, as well as
determining the necessary size for output buffers.

Signed-off-by: James Cloos <cloos@jhcloos.com>