public static short ReadInt16(this MemoryStream stream) { var res = BStruct.ToInt16(stream.GetBuffer(), (int)stream.Position); stream.Position += 2; return(res); }
public short ReadInt16() { ReadTypeCode(RencodeTypeCode.Int16); var buffer = new byte[2]; stream.Read(buffer, 0, buffer.Length); return(BStruct.ToInt16(buffer, 0)); }