Change return type to CompressionMethod.