adjust compression method when source buffer is empty. ref #7.