ReadVaruint36Small reads a varint optimized for small values (up to 36 bits) Used for string headers: (length << 2) | encoding
(err *Error)
| 985 | // ReadVaruint36Small reads a varint optimized for small values (up to 36 bits) |
| 986 | // Used for string headers: (length << 2) | encoding |
| 987 | func (b *ByteBuffer) ReadVaruint36Small(err *Error) uint64 { |
| 988 | if b.remaining() >= 8 { |
| 989 | return b.readVaruint36SmallFast() |
| 990 | } |
| 991 | return b.readVaruint36SmallSlow(err) |
| 992 | } |
| 993 | |
| 994 | func (b *ByteBuffer) readVaruint36SmallFast() uint64 { |
| 995 | // Single instruction load using unsafe pointer cast (little-endian only) |
no test coverage detected