\Grafika\Gd\HelperGifByteStream

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.

Summary

Methods
Properties
Constants
__construct()
bite()
find()
back()
next()
length()
setPosition()
getPosition()
getBytes()
isEnd()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$position
$bytes
N/A

Properties

$position

$position : integer

Type

integer

$bytes

$bytes : string

Type

string

Methods

__construct()

__construct(string  $bytes) 

GifByteStream constructor.

Parameters

string $bytes

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

bite()

bite(integer  $size) : string

Take a bite from the byte stream.

Parameters

integer $size

Byte size in integer.

Returns

string

find()

find(  $byteString,   $offset) : boolean|float

Parameters

$byteString
$offset

Returns

boolean|float

back()

back(integer  $step = 1) 

Parameters

integer $step

next()

next(integer  $step = 1) 

Parameters

integer $step

length()

length() : float

Returns

float

setPosition()

setPosition(  $position) 

Parameters

$position

getPosition()

getPosition() : integer

Returns

integer

getBytes()

getBytes() : mixed

Returns

mixed

isEnd()

isEnd() : boolean

Returns

boolean