compress: refactor tests, check content-length for threshold. closes #906