// ReadBit reads a single bit.
ReadBit reads a single bit.
// ReadBit reads a single bit .
func (r *Reader) ReadBit() (Bit, error) {
	var err error
	if r.index == 0 {
		r.avail, r.err = r.r.Read(r.bytes)
	}
	b := r.currentBit()
	if r.avail == 0 || r.byteIndex() > r.avail {
		err = r.err
	} else {
		r.incIndex()
	}
	return b, err
}
func ( r * Reader ) ReadBit ( ) ( Bit , error ) { var err error if r . index == 0 { r . avail , r . err = r . r . Read ( r . bytes ) } b := r . currentBit ( ) if r . avail == 0 || r . byteIndex ( ) > r . avail { err = r . err } else { r . incIndex ( ) } return b , err }
ReadBit reads a single bit.
ReadBit reads a single bit .