refactor compression stream classes