SquizAlgo

A squiz algorithm whom type is erased behind an interface. This helps to choose algorithm at run time.

Members

Functions

end
void end(SquizStream stream)

Release the resources used by this stream. Most of the memory (if not all) used by algorithm is allocating with the garbage collector, so not calling this function has little consequence (if not none).

initialize
SquizStream initialize()

Initialize a new stream for processing data with this algorithm.

process
Flag!"streamEnded" process(SquizStream stream, Flag!"lastChunk" lastChunk)

Processes the input stream data to produce output stream data. lastChunk indicates that the input chunk in stream is the last one. This is an indication to the algorithm that it can start to finish the work. Returned value indicates that there won't be more output generated than the one in stream.output

reset
void reset(SquizStream stream)

Reset the state of this stream, yet reusing the same allocating resources, in order to start processing another data stream.

Meta