Skip to content

Commit 4a2479f

Browse files
committed
Added Write overload
1 parent 99b1ce6 commit 4a2479f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

MLAPI/NetworkingManagerComponents/Binary/BitStream.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public override void SetLength(long value)
212212
}
213213

214214
/// <summary>
215-
/// Write data from the given buffer to the internal stream buffer,
215+
/// Write data from the given buffer to the internal stream buffer.
216216
/// </summary>
217217
/// <param name="buffer">Buffer to write from.</param>
218218
/// <param name="offset">Offset in given buffer to start reading from.</param>
@@ -234,6 +234,12 @@ public override void Write(byte[] buffer, int offset, int count)
234234
if (BitPosition > BitLength) BitLength = BitPosition;
235235
}
236236

237+
/// <summary>
238+
/// Write data from the given buffer to the internal stream buffer.
239+
/// </summary>
240+
/// <param name="buffer">Buffer to write from.</param>
241+
public void Write(byte[] buffer) => Write(buffer, 0, buffer.Length);
242+
237243
/// <summary>
238244
/// Grow buffer if possible. According to Max(bufferLength, 1) * growthFactor^Ceil(newContent/Max(bufferLength, 1))
239245
/// </summary>

0 commit comments

Comments
 (0)