public void WriteInt64(long value) { if (Pos + 8 > End) { FlushBuffer(); if (Pos + 8 > End) { var b = new byte[8]; PackUnpack.PackInt64BE(b, 0, value); WriteBlock(b); return; } } PackUnpack.PackInt64BE(Buf, Pos, value); Pos += 8; }
public void WriteInt64(long value) { if (Pos + 8 > End) { FlushBuffer(); if (Pos + 8 > End) { Span <byte> buf = stackalloc byte[8]; BinaryPrimitives.WriteInt64BigEndian(buf, value); WriteBlock(buf); return; } } PackUnpack.PackInt64BE(Buf, Pos, value); Pos += 8; }