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

Method ReadVarUint32Small7

go/fory/buffer.go:1528–1542  ·  view source on GitHub ↗

ReadVarUint32Small7 reads a VarUint32 in small-7 format with error checking

(err *Error)

Source from the content-addressed store, hash-verified

1526
1527// ReadVarUint32Small7 reads a VarUint32 in small-7 format with error checking
1528func (b *ByteBuffer) ReadVarUint32Small7(err *Error) uint32 {
1529 if b.readerIndex >= len(b.data) {
1530 if !b.fill(1, err) {
1531 return 0
1532 }
1533 }
1534 readIdx := b.readerIndex
1535 v := b.data[readIdx]
1536 readIdx++
1537 if v&0x80 == 0 {
1538 b.readerIndex = readIdx
1539 return uint32(v)
1540 }
1541 return b.readVarUint32Small14(err)
1542}
1543
1544func (b *ByteBuffer) readVarUint32Small14(err *Error) uint32 {
1545 readIdx := b.readerIndex

Callers 10

decodeTypeDefFunction · 0.95
ReadMetaStringBytesMethod · 0.80
ReadDataMethod · 0.80
readEnumFieldUnsafeFunction · 0.80
skipValueFunction · 0.80
readPkgNameFunction · 0.80
readTypeNameFunction · 0.80
readFieldTypeWithFlagsFunction · 0.80

Calls 3

fillMethod · 0.95
readVarUint32Small14Method · 0.95
uint32Function · 0.50