Skip to content

GuitarPrometheus::Parser::GpxBitInput

GuitarPrometheus::Parser::GpxBitInput

Bit-level reader used by [GpxFileSystem]() to decode the BCFZ compressed stream and the BCFS sector-based filesystem inside it. More…

#include <GpxBitInput.h>

Public Functions

Name
GpxBitInput(const std::uint8_t * data, std::size_t size)
Construct a reader over the given byte buffer.
intreadBit()
intreadBits(int count)
Read count bits and assemble them MSB-first into an integer.
intreadBitsReversed(int count)
Read count bits and assemble them LSB-first within the field.
std::uint8_treadByte()
Convenience: read 8 bits as an unsigned byte.
boolhasMore() const
True iff at least one more bit is available.
std::size_tbytePosition() const
Current byte position (informational).

Detailed Description

class GuitarPrometheus::Parser::GpxBitInput;

Bit-level reader used by [GpxFileSystem]() to decode the BCFZ compressed stream and the BCFS sector-based filesystem inside it.

Reads bits MSB-first within each byte to match alphaTab’s convention.

Public Functions Documentation

function GpxBitInput

GpxBitInput(
const std::uint8_t * data,
std::size_t size
)

Construct a reader over the given byte buffer.

Parameters:

  • data Bytes to read from. Lifetime must exceed all reader calls.
  • size Length of data in bytes.

function readBit

int readBit()

Return: 1 or 0; the next bit (MSB-first within each byte). Returns 0 at EOF.

function readBits

int readBits(
int count
)

Read count bits and assemble them MSB-first into an integer.

function readBitsReversed

int readBitsReversed(
int count
)

Read count bits and assemble them LSB-first within the field.

function readByte

std::uint8_t readByte()

Convenience: read 8 bits as an unsigned byte.

function hasMore

bool hasMore() const

True iff at least one more bit is available.

function bytePosition

std::size_t bytePosition() const

Current byte position (informational).


Updated on 2026-05-29 at 07:39:52 +0000