implement compression ratio and get tests to pass