Пример #1
0
        public override long ReadInt64()
        {
            long val = base.ReadInt64();

#if true
            return(BinaryReverseWriter.SwapBytes(val));
#else
            unsafe
            {
                this.SwapBytes((byte *)&val, 8);
            }
            return(val);
#endif
        }
Пример #2
0
        public override ushort ReadUInt16()
        {
            ushort val = base.ReadUInt16();

#if true
            return(BinaryReverseWriter.SwapBytes(val));
#else
            unsafe
            {
                this.SwapBytes((byte *)&val, 2);
            }
            return(val);
#endif
        }
Пример #3
0
        public override int ReadInt32()
        {
            int val = base.ReadInt32();

#if true
            return(BinaryReverseWriter.SwapBytes(val));
#else
            unsafe
            {
                this.SwapBytes((byte *)&val, 4);
            }
            return(val);
#endif
        }