You can use Deflater / Inflater , which is built into the JDK. There are also GZIPInputStream and GZIPOutputStream, but it really depends on your exact use.
Edit:
, , - HTTP. , , ( deflate/gzip). . , , , . webservices http client, , , .
, jakarta-commons httpclient , . , -
.addRequestHeader("Accept-Encoding","gzip,deflate");