let me make sure i understand you right - you want to run some sort of in-memory Zip type compression on a large text string?
if that's the case, one simple method is to write it to a file, then call some sort of external program like "gzip" to compress the file, then read the compressed file back into memory.
if you want to get a little trickier you can try giong to http://www.gzip.org/zlib/ and downloading a zlib library that might allow you to do the compression entirely in memory. i haven't played with it myself, i'm just venturing a guess.
how long are these text strings you are talking about?
micah