Copied over Gary Bernhardt's 'compressability' script