nextByte reads the next byte from the buffer
()
| 53 | |
| 54 | // nextByte reads the next byte from the buffer |
| 55 | func (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. |