Few days ago I had to wrap a compressed stream so that the data which is actually passed to the client code is not an arbitrary stream of bytes but something that can be written in a text file. An obvious answer is Base64.
There's however one caveat - we do not have any implementation of base64 decorating streams in the base class library.
What I expected is something like:
As I've not been able to find any useful implementation, I wrote some rough code which is not fully tested but seems to work correctly in few important scenarios. Please use and modify the code at your own risk.
Note also that you can alternatively switch between Base64 and BinHex encodings (BinHex uses only digits to encode data).