Check return value when opening a decompressor.
I encountered an segment fault when trying to download a gzip encoding html(such as www.qq.com) without zlib correctly installed. Trying to fix this.
Approver's checklist:
- There is a test suite reasonably covering new functionality or modifications
- Function naming, parameters, return values, types, etc., are consistent with existing code
- This feature/change has adequate documentation added (if appropriate)
- No obvious mistakes / misspelling in the code