readByte reads a single byte
()
| 147 | |
| 148 | // readByte reads a single byte |
| 149 | func (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 |
| 162 | func (r *reader) readBytes(n uint32) []byte { |
no test coverage detected