MCPcopy Create free account
hub / github.com/dotabuff/manta / nextByte

Method nextByte

reader.go:55–61  ·  view source on GitHub ↗

nextByte reads the next byte from the buffer

()

Source from the content-addressed store, hash-verified

53
54// nextByte reads the next byte from the buffer
55func (r *reader) nextByte() byte {
56 r.pos += 1
57 if r.pos > r.size {
58 _panicf("nextByte: insufficient buffer (%d of %d)", r.pos, r.size)
59 }
60 return r.buf[r.pos-1]
61}
62
63// readBitMasks[k] is a bitmask of the low k bits. It is used instead of an
64// inline (1<<k)-1 so that k == 64 (a full word) does not overflow the shift.

Callers 3

readBitsMethod · 0.95
peekBitsMethod · 0.95
readByteMethod · 0.95

Calls 1

_panicfFunction · 0.85

Tested by

no test coverage detected