The recommended API for apache httpclient seems to be the HC Fluent API these days. I cannot find an example using gzip encoding for the request or response however.
The tutorial https://hc.apache.org/httpcomponents-client-ga/tutorial/html/fluent.html doesn't mention how to add interceptors which seem to be one way of adding this functionality
I'm happy to use the 'old' HttpPost style API if written against the latest httpclient version (currently 4.5) but these APIs appear to get rewritten and the previous one deprecated frequently meaning previous answers based on these APIs are out of date e.g.