class InFilterStream : public Stream
Adapter Stream that glues an input stream with some filtering object, typically of compression/decompression class.
Pointer to input stream that serves as the source of data to be filtered.
Callback2<const void *, int> Filter
Callback to filter input function.
In some cases, there is a logical end of filtered stream before the end of 'real' stream. This Gate serves as signal of such situation.
Callback to filter finalization. This is invoked by InFilterStream when it reaches the end of input stream. It gives chance to the filter to flush any remaining data (to Out).
Callback used for alternate mode of operation where instead of input stream and filter only single data source is used. It should return true if source of data is still active, false when it reaches the end. False is then interpreted as EOF of InFilterStream.
void Out(const void *ptr, int size)
Method serving as filter output.
This callback is called whenever Out method is invoked. It is intended for load progress indicators.
template <class F> void Set(Stream& in_, F& filter)
Sets the input stream and filter. Filter must have WhenOut callback which is connected to Out method and Put and End methods that are connected to Filter and End callbacks.
void SetBufferSize(int size)
Sets the size of internal buffer used to store input data before being filtered.
template <class F> InFilterStream(Stream& in, F& filter)
Equivalent of default constructor followed by Set.