Repository navigation
Bug fix
reader := NewBitReader([]uint8{255}, 0, 0)
reader.SetBits(8 + 1)
got := reader.Read8R(8, 1) // ->> panic!!func (r *BitReader[T]) SetBits(bits int) {
+ if max := len(r.data) * r.s; bits > max {
+ bits = max
+ return
+ }
r.bits = bits
}