PHP Class Grafika\Gd\Helper\GifByteStream

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.
Datei anzeigen Open project: kosinix/grafika

Public Methods

Method Description
__construct ( string $bytes ) GifByteStream constructor.
back ( integer $step = 1 )
bite ( integer $size ) : string Take a bite from the byte stream.
find ( $byteString, $offset ) : boolean | float
getBytes ( ) : mixed
getPosition ( ) : integer
isEnd ( ) : boolean
length ( ) : float
next ( integer $step = 1 )
setPosition ( $position )

Method Details

__construct() public method

GifByteStream constructor.
public __construct ( string $bytes )
$bytes string Accepts only the string created by unpack('H*')

back() public method

public back ( integer $step = 1 )
$step integer

bite() public method

Take a bite from the byte stream.
public bite ( integer $size ) : string
$size integer Byte size in integer.
return string

find() public method

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

getBytes() public method

public getBytes ( ) : mixed
return mixed

getPosition() public method

public getPosition ( ) : integer
return integer

isEnd() public method

public isEnd ( ) : boolean
return boolean

length() public method

public length ( ) : float
return float

next() public method

public next ( integer $step = 1 )
$step integer

setPosition() public method

public setPosition ( $position )
$position