|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
Reads a byte buffer as a stream of bits, most significant bit first. More...
#include <BitReader.h>
Public Member Functions | |
| CBitReader (std::span< const uint8_t > data) noexcept | |
| CBitReader (std::span< const std::byte > data) noexcept | |
| uint32_t | ReadBits (unsigned int n) noexcept |
| Reads n bits, up to 32. | |
| void | SkipBits (size_t n) noexcept |
| uint32_t | ReadUE (uint32_t max=UINT32_MAX - 1) noexcept |
| Reads an unsigned Exp-Golomb code. A value above max is an error. | |
| int32_t | ReadSE () noexcept |
| Reads a signed Exp-Golomb code. | |
| void | SkipUE () noexcept |
| void | SkipSE () noexcept |
| void | ByteAlign () noexcept |
| size_t | Position () const noexcept |
| The number of bits read or skipped. | |
| size_t | BitsLeft () const noexcept |
| bool | Error () const noexcept |
Reads a byte buffer as a stream of bits, most significant bit first.
A read or skip that does not fit sets Error() and leaves the position unchanged. The error is sticky: once set, every read returns 0 and every skip does nothing, so a caller can parse a whole structure and check Error() once at the end.
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
The number of bits read or skipped.
|
inlinenoexcept |
Reads n bits, up to 32.
|
inlinenoexcept |
Reads a signed Exp-Golomb code.
|
inlinenoexcept |
Reads an unsigned Exp-Golomb code. A value above max is an error.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |