setasign\SetaPDF2\Core\Image\Gif\Reader

Bit Class used to read single bits.

File: /SetaPDF v2/Core/Image/Gif/Reader/Bit.php
Old class name (alias): \SetaPDF_Core_Image_Gif_Reader_Bit

Class hierarchy

Summary

Properties

$_bitOffset

private int Bit::$_bitOffset

The bit offset in the current byte.

$_currentByte

private int|false Bit::$_currentByte

The currently read byte converted to a unsigned int8.

$_numBits

private int Bit::$_numBits

The number of bits that get read by readBits() call.

$_reader

The reader used to read bytes.


Methods

__construct()

_readByte()

private Bit::_readByte (
void
): void

Reads a new byte into the _currentByte property.

Exceptions

Throws \setasign\SetaPDF2\Core\Image\Exception

getReader()

Gets the currently attached reader instance.

readBits()

public Bit::readBits (
void
): int

Reads the next bits.

Exceptions

Throws \setasign\SetaPDF2\Core\Image\Exception

setNumBits()

public Bit::setNumBits (
int $numBits
): void

Sets the number of bits that shall be read.

Parameters
$numBits : int