I want to compress a string(an XML Document) in Java and store it in Cassandra db as varchar
. I should be able to decompress it while reading from db. I looked into GZIP and lz4 and both return a byte array on compressing.
My goal is to obtain a string from the compressed data which can also be used to decompress and get back the original string. What is the best possible approach?