UnsafePutVarInt64 writes a zigzag-encoded varint64 at the given offset without advancing writerIndex. Caller must have called Reserve() to ensure capacity. Returns the number of bytes written (1-9).
(offset int, value int64)
| 780 | // Caller must have called Reserve() to ensure capacity. |
| 781 | // Returns the number of bytes written (1-9). |
| 782 | func (b *ByteBuffer) UnsafePutVarInt64(offset int, value int64) int { |
| 783 | u := uint64((value << 1) ^ (value >> 63)) |
| 784 | return b.UnsafePutVarUint64(offset, u) |
| 785 | } |
| 786 | |
| 787 | // UnsafePutVarUint64 writes an unsigned VarUint64 at the given offset without advancing writerIndex. |
| 788 | // Caller must have called Reserve(16) to ensure capacity (for bulk writes). |
no test coverage detected