WPILibC++ 2023.4.3
|
Unsigned LEB128 streaming reader. More...
#include <wpi/leb128.h>
Public Member Functions | |
std::optional< uint64_t > | ReadOne (std::span< const uint8_t > *in) |
Decode a single ULEB128 value. More... | |
Unsigned LEB128 streaming reader.
Decode an unsigned LEB128 encoded datum. The algorithm is taken from Appendix C of the DWARF 3 spec. For information on the encodings refer to section "7.6 - Variable Length Data".
std::optional< uint64_t > wpi::Uleb128Reader::ReadOne | ( | std::span< const uint8_t > * | in | ) |
Decode a single ULEB128 value.
Returns after a single ULEB128 value has been read or insufficient input (call in a loop to get multiple values). If a value is returned, internal state is reset so it's safe to immediately call this function again to decode another value.
in | Input data; modified as data is consumed (any unconsumed data is left when function returns). |