|
ADS
Algorithms and Data Structures
|
a growing sequence of bits, packed in bytes, the first bit in the most significant bit of the first byte More...
#include <ADS/compression/PackedBits.h>
Public member functions | |
| void | put (bool b) |
| appends the bit \( b \) | |
| void | put (std::uint64_t v, int k) |
| appends the \( k \) low bits of \( v \), the most significant first | |
| void | put (const std::string &s) |
| appends the bits of \( s \), a string of '0' and '1' | |
| std::size_t | size (void) const |
| the number of bits written | |
| const std::vector< std::uint8_t > & | bytes (void) const |
| the bytes, the last one padded with zeros | |
a growing sequence of bits, packed in bytes, the first bit in the most significant bit of the first byte
|
inlinenodiscard |
the bytes, the last one padded with zeros
| void ADS::PackedBitWriter::put | ( | bool | b | ) |
appends the bit \( b \)
| void ADS::PackedBitWriter::put | ( | const std::string & | s | ) |
appends the bits of \( s \), a string of '0' and '1'
| void ADS::PackedBitWriter::put | ( | std::uint64_t | v, |
| int | k ) |
appends the \( k \) low bits of \( v \), the most significant first
|
inlinenodiscard |
the number of bits written