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

Method continueWriteVarUint32Small7

go/fory/buffer.go:1417–1429  ·  view source on GitHub ↗
(value uint32)

Source from the content-addressed store, hash-verified

1415}
1416
1417func (b *ByteBuffer) continueWriteVarUint32Small7(value uint32) int {
1418 encoded := uint64(value & 0x7F)
1419 encoded |= uint64((value&0x3f80)<<1) | 0x80
1420 idx := b.writerIndex
1421 if value>>14 == 0 {
1422 b.unsafePutInt32(idx, int32(encoded))
1423 b.writerIndex += 2
1424 return 2
1425 }
1426 d := b.continuePutVarint36(idx, encoded, uint64(value))
1427 b.writerIndex += d
1428 return d
1429}
1430
1431func (b *ByteBuffer) continuePutVarint36(index int, encoded, value uint64) int {
1432 // bits 14

Callers 1

WriteVarUint32Small7Method · 0.95

Calls 4

unsafePutInt32Method · 0.95
continuePutVarint36Method · 0.95
uint64Function · 0.50
int32Function · 0.50

Tested by

no test coverage detected