public static short ReadInt16(this MemoryStream stream)
        {
            var res = BStruct.ToInt16(stream.GetBuffer(), (int)stream.Position);

            stream.Position += 2;
            return(res);
        }
예제 #2
0
        public short ReadInt16()
        {
            ReadTypeCode(RencodeTypeCode.Int16);

            var buffer = new byte[2];

            stream.Read(buffer, 0, buffer.Length);

            return(BStruct.ToInt16(buffer, 0));
        }