Describe the bug
|
return r.remBytes() + r.bitCount |
Code:
// remBits calculates the number of unread bits in the buffer
func (r *reader) remBits() uint32 {
return r.remBytes() + r.bitCount
}
As r.remBytes = r.size - r.pos is the number of bytes left to read.
And r.bitCount is the number of bits left to read in the current byte.
Expected behavior
// remBits calculates the number of unread bits in the buffer
func (r *reader) remBits() uint32 {
return r.remBytes()*8 + r.bitCount
}
If that's it I will make an pull request for that.