public static int ReadInt32(this MemoryStream stream) { var res = BStruct.ToInt32(stream.GetBuffer(), (int)stream.Position); stream.Position += 4; return(res); }
public int ReadInt32() { ReadTypeCode(RencodeTypeCode.Int32); var buffer = new byte[4]; stream.Read(buffer, 0, buffer.Length); return(BStruct.ToInt32(buffer, 0)); }