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)
| 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. |
| 914 | func (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 | |
| 919 | type BufferObject interface { |
| 920 | TotalBytes() int |