return output;
}
+ public short ReadInt16()
+ {
+ short output =
+ (short)(this.Buffer[Position++]
+ | this.Buffer[Position++] << 8);
+ return output;
+ }
+
public int ReadInt32()
{
int output = this.Buffer[Position++]
if (this.Position > this.Length) this.Length = this.Position;
}
+ public void Write(short value)
+ {
+ this.Buffer[this.Position++] = (byte)value;
+ this.Buffer[this.Position++] = (byte)(value >> 8);
+ if (this.Position > this.Length) this.Length = this.Position;
+ }
+
public void Write(ushort value)
{
this.Buffer[this.Position++] = (byte)value;
this.Write(bytes);
}
- public void WriteBytesFull(byte[] bytes)
+ public void WriteBytesAndSize(byte[] bytes)
{
this.WritePacked((uint)bytes.Length);
this.Write(bytes);