diff --git a/KaitaiStream.cs b/KaitaiStream.cs
index 8158b4e..c1d6b22 100644
--- a/KaitaiStream.cs
+++ b/KaitaiStream.cs
@@ -472,6 +472,7 @@ namespace Kaitai
///
/// The expected result
///
+ [Obsolete("use explicit \"if\" using ByteArrayCompare method instead")]
public byte[] EnsureFixedContents(byte[] expected)
{
byte[] bytes = ReadBytes(expected.Length);