phpdftk API Documentation

BitReader
in package

FinalYes

Reads variable-width bit fields from a binary buffer.

Used by the hint table parser to decode the bit-packed per-page and shared-object entries defined in ISO 32000-2 Annex F.

Table of Contents

Methods

__construct()  : mixed
alignToByte()  : void
Advance to the next byte boundary.
getBitPosition()  : int
Current position in bits.
getBytePosition()  : int
Current position in bytes (rounded down).
readBits()  : int
Read an unsigned integer of the given bit width.

Methods

__construct()

public __construct(string $data) : mixed
Parameters
$data : string

alignToByte()

Advance to the next byte boundary.

public alignToByte() : void

getBitPosition()

Current position in bits.

public getBitPosition() : int
Return values
int

getBytePosition()

Current position in bytes (rounded down).

public getBytePosition() : int
Return values
int

readBits()

Read an unsigned integer of the given bit width.

public readBits(int $count) : int
Parameters
$count : int

Number of bits to read (0–32)

Return values
int

        
On this page

Search results