Writes individual bits, most significant first, into an underlying byte stream.

Synopsis

Declared in <streams.h>

template<typename OStream>
class BitStreamWriter;

Member Functions

Name

Description

BitStreamWriter [constructor]

Construct a bit writer over the given output byte stream.

~BitStreamWriter [destructor]

Flush any buffered bits, then destroy the writer.

Flush

Flush any unwritten bits to the output stream, padding with 0's to the next byte boundary.

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

Name

Description

GolombRiceEncode

Golomb‐Rice encode a value into a bit stream.

Created with MrDocs