Skip to content

Commit 4853541

Browse files
committed
perf: Made BitStream.Write use Buffer.BlockCopy
1 parent 9183da1 commit 4853541

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MLAPI/Serialization/BitStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public override void Write(byte[] buffer, int offset, int count)
281281
if (BitAligned)
282282
{
283283
if (Position + count >= target.Length) Grow(count);
284-
Array.Copy(buffer, offset, target, Position, count);
284+
Buffer.BlockCopy(buffer, offset, target, (int)Position, count);
285285
Position += count;
286286
}
287287
else

0 commit comments

Comments
 (0)