What is the best memory and file compressor lzo, bzip2, zlib or lzma ?
It depends on the sort of data that you're going to be throwing at the compressor. For our particular case (VMWare images, executables and source files), we opted for 7zip (LZMA, I believe) in Ultra mode, simply because it gave us better compression than any others. We weren't that fussed about the speed of compression since that is easily amortized. Speed of decompression was important but not nearly as important as file size.
Your mileage may vary. My advice would be to try them all with the sort of data sets you're likely to compress and see which one is better (whatever your definition of 'better' entails). Or provide a translation layer so you can easily replace one with another.
Here's a nice article for you:
Mostly, this benchmark turns out as expected (and advertised by the lzma authors). Gzip is fastest on compression; bzip2 comes second for compression times and lzma finishes last. Decompression is different: gzip is fastest again, but lzma is faster than bzip2, sometimes nearly by a factor of three. Compression ratio is where gzip shows its age: its compression ratio is worst (except when packing already compressed stuff). Bzip2 bests lzma's compression ration in three cases of five (two of four if you don't count the PNG). On average, however, lzma compresses better by a hair.
Apart from the resource usage/speed etc i think type of files used for compression also matter. Try compressing an mp3/wma file ,even at higher bitrates , it wont get compressed significanly. However take some source files and compress it, you will see it reduces the size many folds.