Compress functionality modified.

Signed-off-by: Sanjay Madnani <http://sanjaymadnani.wordpress.com/>