// WriteBit writes a single bit.
//
// The number of bits written will be returned, which will be 0 until a chunk
// is filled.
WriteBit writes a single bit.

The number of bits written will be returned, which will be 0 until a chunk
is filled.
// WriteBit writes a single bit . // // The number of bits written will be returned which will be 0 until a chunk // is filled .
func (w *Writer) WriteBit(b Bit) (written int, err error) {
	w.bytes[w.byteIndex()] |= b << (7 - w.bitIndex())
	if wrapped := w.incIndex(); wrapped {
		written, err = w.Commit()
	}
	return
}
func ( w * Writer ) WriteBit ( b Bit ) ( written int , err error ) { w . bytes [ w . byteIndex ( ) ] |= b << ( 7 - w . bitIndex ( ) ) if wrapped := w . incIndex ( ) ; wrapped { written , err = w . Commit ( ) } return }
WriteBit writes a single bit.
WriteBit writes a single bit .
// NOTE Just defining bool in var for clarity of purpose