|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
A bounds-guarded little-endian bit reader over a record's byte span. More...
#include <wowlib/db/wdc/bit_stream.hpp>
Public Member Functions | |
| BitReader (const std::byte *base, std::size_t limit) | |
| std::uint64_t | read (std::size_t bitOffset, std::size_t bits) const |
| Read bits (<= 64) starting at absolute bit offset bitOffset. | |
A bounds-guarded little-endian bit reader over a record's byte span.
Definition at line 16 of file bit_stream.hpp.
|
inline |
| base | the record's first byte. |
| limit | bytes available from base (bounds guard). |
Definition at line 20 of file bit_stream.hpp.
|
inline |
Read bits (<= 64) starting at absolute bit offset bitOffset.
The value may straddle up to 9 bytes (a 7-bit shift plus 64 bits of payload), so the load happens in two 8-byte halves that are shifted and or-ed back together.
| bitOffset | the starting bit position within the record. |
| bits | the field width in bits. |
Definition at line 30 of file bit_stream.hpp.
Referenced by wowlib::db::wdc::WdcImage::fieldRaw().