reduce code duplication with patch by Thomas Meyer

the patch was part of a patch attached to COMPRESS-207
1 file changed