Revenj.Utility.ChunkedMemoryStream.Matches C# (CSharp) Method

Matches() public method

Check if stream starts with provided byte[] and matches it's length Provided byte[] must be smaller than 8192 bytes
public Matches ( byte compare ) : bool
compare byte
return bool
        public bool Matches(byte[] compare)
        {
            if (Length != compare.Length)
                return false;
            var block = Blocks[0];
            for (int i = 0; i < compare.Length; i++)
                if (block[i] != compare[i])
                    return false;
            return true;
        }