// ReadBits reads attempts to read n bits, and returns those bits collected
// into an int, the actual amount read, and any error that might have
// occurred.
ReadBits reads attempts to read n bits, and returns those bits collected
into an int, the actual amount read, and any error that might have
occurred.
// ReadBits reads attempts to read n bits and returns those bits collected // into an int the actual amount read and any error that might have // occurred .
func (r *Reader) ReadBits(n int) (bits Bits, read int, err error) {
	for read = 0; read < n; read++ {
		var b Bit
		b, err = r.ReadBit()
		if err != nil {
			return
		}
		bits <<= 1
		bits |= Bits(b)
	}
	return
}
func ( r * Reader ) ReadBits ( n int ) ( bits Bits , read int , err error ) { for read = 0 ; read < n ; read ++ { var b Bit b , err = r . ReadBit ( ) if err != nil { return } bits <<= 1 bits |= Bits ( b ) } return }
ReadBits reads attempts to read n bits, and returns those bits collected
into an int, the actual amount read, and any error that might have
occurred.
ReadBits reads attempts to read n bits and returns those bits collected into an int the actual amount read and any error that might have occurred .