Figure 2: Some Bytes are Written Bits are stored in the buffer. The class keeps track of where to store the next bit with a "cursor" advanced after each write.
Figure 2