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

Method readVarUint32Small14

go/fory/buffer.go:1544–1561  ·  view source on GitHub ↗
(err *Error)

Source from the content-addressed store, hash-verified

1542}
1543
1544func (b *ByteBuffer) readVarUint32Small14(err *Error) uint32 {
1545 readIdx := b.readerIndex
1546 if len(b.data)-readIdx >= 5 {
1547 four := binary.LittleEndian.Uint32(b.data[readIdx:])
1548 readIdx++
1549 value := four & 0x7F
1550 if four&0x80 != 0 {
1551 readIdx++
1552 value |= (four >> 1) & 0x3f80
1553 if four&0x8000 != 0 {
1554 return b.continueReadVarUint32(readIdx, four, value, err)
1555 }
1556 }
1557 b.readerIndex = readIdx
1558 return value
1559 }
1560 return b.readVarUint32Slow(err)
1561}
1562
1563func (b *ByteBuffer) continueReadVarUint32(readIdx int, bulkRead, value uint32, err *Error) uint32 {
1564 readIdx++

Callers 1

ReadVarUint32Small7Method · 0.95

Calls 2

continueReadVarUint32Method · 0.95
readVarUint32SlowMethod · 0.95

Tested by

no test coverage detected