Java Large String compression safe approach

For a large string size ~15k, is any java recommended string compression and decompression techniques that are safe to implement.
The gzip format gives junk characters during compression and will it get corrupted when sent in the HTTP soap request. Please advise.