The type encoding_ostream<Coder> is the encoding counterpart of the type ostream from the C++ iostream library. Each instance os of type encoding_ostream<Coder> is attached to a streambuf sb. Every data that is written to os is encoded on-the-fly by an instance of type Coder and then written to sb. All operations and all operators («) defined for C++ ostreams can be applied to encoding_ostream as well.
#include < LEDA/coding/coder_util.h >
|encoding_ostream<Coder>||os(streambuf* encoded_stream, bool own_stream = false)|
|creates an instance os and attaches it to the given streambuf object.|
|Coder*||os.get_coder()||returns the instance of Coder which is used for encoding.|
|void||os.close()||detaches os from its streambuf object.|