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

Method readByte

reader.go:149–159  ·  view source on GitHub ↗

readByte reads a single byte

()

Source from the content-addressed store, hash-verified

147
148// readByte reads a single byte
149func (r *reader) readByte() byte {
150 // Fast path if we're byte aligned
151 if r.bitCount&7 == 0 {
152 if r.bitCount != 0 {
153 r.realign()
154 }
155 return r.nextByte()
156 }
157
158 return byte(r.readBits(8))
159}
160
161// readBytes reads the given number of bytes
162func (r *reader) readBytes(n uint32) []byte {

Callers 4

readVarUint32Method · 0.95
readVarUint64Method · 0.95
readStringMethod · 0.95
readBitsAsBytesMethod · 0.95

Calls 3

realignMethod · 0.95
nextByteMethod · 0.95
readBitsMethod · 0.95

Tested by

no test coverage detected