Check whether the compressed file is bigger than original or is empty

Please don't merge unrelated modification in one commit, especially it has nothing to do with the commit log and pull request.