50#ifndef __ADS_BitStream
51 #define __ADS_BitStream
90 [[nodiscard]] std::size_t
size(
void )
const;
165 [[nodiscard]]
bool atEnd(
void )
const;
220#include "ADS/succinct/impl/BitStream.tpp"
The vector of bits on which the succinct structures and the integer codes of ADS are built: the bits ...
The broadword tricks of Knuth (section 7.1.3 of The Art of Computer Programming), beyond the book: op...
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The primitives of the processor that the compilers spell each in their own way, in one form for all: ...
void seek(std::size_t p)
moves to the place
Word readBinary(int len)
the next bits, the first in the most significant place, the field of writeBinary()
bool readBit(void)
the next bit
BitReader(const BitVector &b, std::size_t p=0)
the bits of from the place
Word read(int len)
the next bits, the first in the least significant place
bool atEnd(void) const
whether all the bits have been read
std::uint64_t readUnary(void)
the number of zeros before the next 1, which is read too
std::size_t position(void) const
the place of the next bit
a vector of bits packed in words of 64 bits
Definition BitVector.h:479
void write(Word v, int len)
the bits of , the least significant first
void writeBit(bool b)
appends the bit
BitWriter(void)=default
an empty stream
void writeUnary(std::uint64_t q)
zeros and a 1, the unary code
std::size_t size(void) const
the bits written so far
const BitVector & bits(void) const
the bits written
BitVector release(void)
the bits written, which the writer leaves empty
void writeBinary(Word v, int len)
the bits of , the most significant first
std::uint64_t Word
a word of 64 bits
Definition Bitwise.h:73