nit  i would suggest that exposing the zlib return values here is overkill  the client of such a function is only concerned about uncompressing the whole file  otherwise it would be using the gzx functions directly so just make it return a boolean  true for success  false for failure  