[#BitStreamWriter] = BitStreamWriter :mrdocs: Writes individual bits, most significant first, into an underlying byte stream. == Synopsis Declared in `<streams.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename OStream> class BitStreamWriter; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BitStreamWriter/2constructor.adoc[`BitStreamWriter`] [.small]#[constructor]# | Construct a bit writer over the given output byte stream. | xref:BitStreamWriter/2destructor.adoc[`~BitStreamWriter`] [.small]#[destructor]# | Flush any buffered bits, then destroy the writer. | xref:BitStreamWriter/Flush.adoc[`Flush`] | Flush any unwritten bits to the output stream, padding with 0's to the next byte boundary. | xref:BitStreamWriter/Write.adoc[`Write`] | Write the nbits least significant bits of a 64‐bit int to the output stream. Data is buffered until it completes an octet. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:GolombRiceEncode.adoc[`GolombRiceEncode`] | Golomb‐Rice encode a value into a bit stream. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#