implemented the compression ratio calculation; close #14