Added compression functionality