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

Method ReadUint8

go/fory/buffer.go:1261–1270  ·  view source on GitHub ↗

ReadUint8 reads a uint8 and sets error on bounds violation

(err *Error)

Source from the content-addressed store, hash-verified

1259
1260// ReadUint8 reads a uint8 and sets error on bounds violation
1261func (b *ByteBuffer) ReadUint8(err *Error) uint8 {
1262 if b.readerIndex >= len(b.data) {
1263 if !b.fill(1, err) {
1264 return 0
1265 }
1266 }
1267 v := b.data[b.readerIndex]
1268 b.readerIndex++
1269 return v
1270}
1271
1272// WriteVarint32 writes a signed int32 using zigzag encoding (compatible with Java's writeVarint32).
1273func (b *ByteBuffer) WriteVarint32(value int32) int8 {

Callers 15

requireRootTypeIDFunction · 0.95
TestDecimalWireEncodingFunction · 0.95
ReadTypeInfoMethod · 0.80
ReadTypeInfoForTypeMethod · 0.80
ReadMethod · 0.80
ReadDataMethod · 0.80
ReadStringSliceFunction · 0.80
ReadMethod · 0.80
ReadMethod · 0.80
ReadMethod · 0.80

Calls 1

fillMethod · 0.95