- •
Filters are OO (just like the streams and wrappers).
- •
We use a bucket-brigade (similar concept to Apache2 filters)
- •
Brigade is a doubly-linked list that contains a number of data buckets
chained together.
- •
No need to maintain/realloc a monolithic buffer.
- •
meta-buckets can contain information about EOF conditions.
- •
Useful structure since the data and EOF events may occur
on separate invocations of fread().
- •
For filters that simply pass through data,
buckets can be passed on to next filter without
the overhead of memcpy()/malloc() - just re-link filter
into the next brigade.
- •
Separate stacks for reading and writing.