setter/getter for compression with error handling added