|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
A little-endian bit writer over a record buffer — the encode counterpart of BitReader. More...
#include <wowlib/db/wdc/bit_stream.hpp>
Public Member Functions | |
| BitWriter (std::byte *base, std::size_t limit) | |
| void | write (std::size_t bitOffset, std::size_t bits, std::uint64_t value) |
| Write the low bits of value starting at absolute bit offset bitOffset, overwriting whatever was there. | |
A little-endian bit writer over a record buffer — the encode counterpart of BitReader.
write() OVERWRITES (sets and clears each bit), so it works on a zeroed buffer (canonical encode) and for patching an existing record in place alike.
Definition at line 59 of file bit_stream.hpp.
|
inline |
| base | the record's first byte. |
| limit | bytes available from base (bounds guard). |
Definition at line 63 of file bit_stream.hpp.
|
inline |
Write the low bits of value starting at absolute bit offset bitOffset, overwriting whatever was there.
Bits that would overrun the buffer are dropped.
| bitOffset | the starting bit position within the record. |
| bits | the field width in bits (<= 64). |
| value | the value whose low bits are written. |
Definition at line 71 of file bit_stream.hpp.