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

Method WriteVarUint32

go/fory/buffer.go:914–917  ·  view source on GitHub ↗

WriteVarUint32 writes a 1-5 byte positive int (no zigzag encoding), returns the number of bytes written. Use this for lengths, type IDs, and other non-negative values.

(value uint32)

Source from the content-addressed store, hash-verified

912// WriteVarUint32 writes a 1-5 byte positive int (no zigzag encoding), returns the number of bytes written.
913// Use this for lengths, type IDs, and other non-negative values.
914func (b *ByteBuffer) WriteVarUint32(value uint32) int8 {
915 b.grow(8) // 8 bytes for bulk uint64 write in worst case
916 return b.UnsafeWriteVarUint32(value)
917}
918
919type BufferObject interface {
920 TotalBytes() int

Calls 2

growMethod · 0.95
UnsafeWriteVarUint32Method · 0.95