public static void AssertIsValid(string compressionType) { if (!IsValid(compressionType)) { throw new NotSupportedException(compressionType + " is not a supported compression type. Valid types: gzip, deflate."); } }