class GifByteStream

Class GifByteStream Normalize string operations.

Treat string as byte stream where 2 string characters are treated as 1 hex string (byte). Eg. String ffff with length 4 is 0xff 0xff in bytes with length of 2.

Methods

__construct(string $bytes)

GifByteStream constructor.

string
bite(int $size)

Take a bite from the byte stream.

bool|float
find($byteString, $offset)

No description

back(int $step = 1)

No description

next(int $step = 1)

No description

float
length()

No description

setPosition($position)

No description

int
getPosition()

No description

mixed
getBytes()

No description

bool
isEnd()

No description

Details

at line line 27
__construct(string $bytes)

GifByteStream constructor.

Parameters

string $bytes Accepts only the string created by unpack('H*')

at line line 40
string bite(int $size)

Take a bite from the byte stream.

Parameters

int $size Byte size in integer.

Return Value

string

at line line 54
bool|float find($byteString, $offset)

Parameters

$byteString
$offset

Return Value

bool|float

at line line 67
back(int $step = 1)

Parameters

int $step

at line line 75
next(int $step = 1)

Parameters

int $step

at line line 83
float length()

Return Value

float

at line line 91
setPosition($position)

Parameters

$position

at line line 99
int getPosition()

Return Value

int

at line line 107
mixed getBytes()

Return Value

mixed

at line line 115
bool isEnd()

Return Value

bool