Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/segmentio/kafka-go
/ writeVarInt
Method
writeVarInt
protocol/encode.go:343–345 ·
view source on GitHub ↗
(i int64)
Source
from the content-addressed store, hash-verified
341
}
342
343
func
(e *encoder) writeVarInt(i int64) {
344
e.writeUnsignedVarInt(uint64((i << 1) ^ (i >> 63)))
345
}
346
347
func
(e *encoder) writeUnsignedVarInt(i uint64) {
348
b := e.buffer[:]
Callers
5
TestVarInts
Function · 0.95
writeVarString
Method · 0.95
writeVarNullBytes
Method · 0.95
writeVarNullBytesFrom
Method · 0.95
writeToVersion2
Method · 0.95
Calls
1
writeUnsignedVarInt
Method · 0.95
Tested by
1
TestVarInts
Function · 0.76