API / Minn\Media\Av / ExpGolomb

ExpGolomb final class

Minn\Media\Av\ExpGolomb · public/minn/src/Minn/Media/Av/ExpGolomb.php · 50 lines

A bit reader over a byte string for the exponential-Golomb codes of a video parameter set: single bits, unsigned and signed codes. Reading past the end reads zeros, and a code longer than 32 bits stops at 32.

Used by 1

Constants and properties

privateint $at
privatereadonly string $bytes

Promoted from the constructor.

Public

new__construct(string $bytes)#
methodbit(): int#

The next bit.

methodskip(int $count): void#

Passes over a number of bits.

methodexhausted(): bool#

Whether every bit has been read (what follows reads as zeros).

methodunsigned(): int#

The next unsigned exponential-Golomb code.

methodsigned(): int#

The next signed exponential-Golomb code.