Have you had any luck with gzdeflate/gzinflate or gzcompress/gzuncompress?

I'm using version 4.2.2 and I am POSTing the input and output strings and I am getting corrupted data when I gzuncompress or gzinflate for larger strings than say "Hello there". The string length is less than 1000 bytes.