MCPcopy Create free account
hub / github.com/apache/fory / ReadVarUint64

Method ReadVarUint64

go/fory/buffer.go:1169–1174  ·  view source on GitHub ↗

ReadVarUint64 reads unsigned varint

(err *Error)

Source from the content-addressed store, hash-verified

1167
1168// ReadVarUint64 reads unsigned varint
1169func (b *ByteBuffer) ReadVarUint64(err *Error) uint64 {
1170 if b.remaining() >= 9 {
1171 return b.readVarUint64Fast()
1172 }
1173 return b.readVarUint64Slow(err)
1174}
1175
1176// Fast path (when the remaining bytes are sufficient)
1177func (b *ByteBuffer) readVarUint64Fast() uint64 {

Callers 15

ReadVarint64Method · 0.95
TestDecimalWireEncodingFunction · 0.95
testBufferVarFunction · 0.95
ReadDataMethod · 0.80
readNumericValueByTypeIDFunction · 0.80
readDirectIntegerScalarFunction · 0.80
ReadDataMethod · 0.80
ReadDataMethod · 0.80
ReadDataMethod · 0.80
readRemainingFieldMethod · 0.80
readOptionFastFunction · 0.80

Calls 3

remainingMethod · 0.95
readVarUint64FastMethod · 0.95
readVarUint64SlowMethod · 0.95

Tested by 1

TestDecimalWireEncodingFunction · 0.76