Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
BitReader.h File Reference
#include <cstddef>
#include <cstdint>
#include <span>
#include <stdexcept>
#include <string>

Classes

class  BitReader
 

Functions

constexpr unsigned int GetBits (unsigned int value, unsigned int firstBit, unsigned int numBits)
 
constexpr uint64_t GetBits64 (uint64_t value, unsigned int firstBit, unsigned int numBits)
 
constexpr uint64_t GetQWord (const std::span< std::byte > bytes, unsigned int offset)
 
constexpr uint32_t GetDWord (const std::span< std::byte > bytes, unsigned int offset)
 
constexpr uint16_t GetWord (const std::span< std::byte > bytes, unsigned int offset)
 
constexpr uint8_t GetByte (const std::span< std::byte > bytes, unsigned int offset)
 
std::string GetString (const std::span< std::byte > bytes, unsigned int offset, unsigned int length)
 

Function Documentation

◆ GetBits()

constexpr unsigned int GetBits ( unsigned int  value,
unsigned int  firstBit,
unsigned int  numBits 
)
constexpr

◆ GetBits64()

constexpr uint64_t GetBits64 ( uint64_t  value,
unsigned int  firstBit,
unsigned int  numBits 
)
constexpr

◆ GetByte()

constexpr uint8_t GetByte ( const std::span< std::byte >  bytes,
unsigned int  offset 
)
constexpr

◆ GetDWord()

constexpr uint32_t GetDWord ( const std::span< std::byte >  bytes,
unsigned int  offset 
)
constexpr

◆ GetQWord()

constexpr uint64_t GetQWord ( const std::span< std::byte >  bytes,
unsigned int  offset 
)
constexpr

◆ GetString()

std::string GetString ( const std::span< std::byte >  bytes,
unsigned int  offset,
unsigned int  length 
)
inline

◆ GetWord()

constexpr uint16_t GetWord ( const std::span< std::byte >  bytes,
unsigned int  offset 
)
constexpr