Ejemplo n.º 1
0
        public void StreamUtils_LongConverters()
        {
            ulong longValue = 0x45976248;

            byte[] byteValue = BitConverter.GetBytes(longValue);
            Assert.AreEqual(longValue, StreamUtils.DecodeUInt64(byteValue));

            byteValue = StreamUtils.EncodeBEUInt64(longValue);
            Assert.AreEqual((long)longValue, StreamUtils.DecodeBEInt64(byteValue));
        }