Processes bytes as they pass through a buffer and replaces sequences in it.

This stream filter deals with Byte arrays rather than simple strings.

package Swift
author Chris Corbyn

 Methods

Create a new ByteArrayReplacementFilter with $search and $replace.

__construct(array $search, array $replace) 

Parameters

$search

array

$replace

array

Perform the actual replacements on $buffer and return the result.

filter(array $buffer, $_minReplaces) : array

Parameters

$buffer

array

$_minReplaces

Returns

array

Returns true if based on the buffer passed more bytes should be buffered.

shouldBuffer(array $buffer) : boolean

Parameters

$buffer

array

Returns

boolean

 Properties

 

$_index 
 

$_repSize 
 

$_replace 
   

$_tree 
 

$_treeMaxLen