All challenges
intermediateDesign Patterns~55 min

Stream Wrappers (Decorator Pattern)

Build the machinery behind I/O stream wrappers like gzip, base64 and text codecs from the Decorator pattern up. You will define a source with a read() method, a Decorator base that wraps another stream and keeps the exact same interface, then stack transformers (uppercase, reverse, repeat, call counting) that add behavior without either the source or the caller knowing the difference.