Added switch to enable/disable compression. moved compression/decompression functions to utilities lib.