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

Method ReadVaruint36Small

go/fory/buffer.go:987–992  ·  view source on GitHub ↗

ReadVaruint36Small reads a varint optimized for small values (up to 36 bits) Used for string headers: (length << 2) | encoding

(err *Error)

Source from the content-addressed store, hash-verified

985// ReadVaruint36Small reads a varint optimized for small values (up to 36 bits)
986// Used for string headers: (length << 2) | encoding
987func (b *ByteBuffer) ReadVaruint36Small(err *Error) uint64 {
988 if b.remaining() >= 8 {
989 return b.readVaruint36SmallFast()
990 }
991 return b.readVaruint36SmallSlow(err)
992}
993
994func (b *ByteBuffer) readVaruint36SmallFast() uint64 {
995 // Single instruction load using unsafe pointer cast (little-endian only)

Callers 1

readStringFunction · 0.80

Calls 3

remainingMethod · 0.95

Tested by

no test coverage detected