Apache Commons Compress works only with archive files (please correct me if I am wrong). I need something like
MyDB.put(LibIAmLookingFor.compress("My long string to store"));
String getBack = LibIAmLookingFor.decompress(MyDB.get()));
And LZW is just an example, could be anything similar. Thank you.
Java has libraries built in for ZIP compression:
http://docs.oracle.com/javase/6/docs/api/java/util/zip/package-summary.html
Will that do what you need?