The type decoding_istream<Coder> is the decoding counterpart of the type istream from the C++ iostream library. Each instance is of type decoding_istream<Coder> is attached to a streambuf sb. Whenever data is requested from is, it reads some data from sb and then decodes it on-the-fly with an intance of type Coder. All operations and all operators (») defined for C++ istreams can be applied to decoding_istream as well.
#include < LEDA/coding/coder_util.h >
|decoding_istream<Coder>||is(streambuf* encoded_stream, bool own_stream = false)|
|creates an instance is and attaches it to the given streambuf object.|
|Coder*||is.get_coder()||returns the instance of Coder which is used for encoding.|
|void||is.close()||detaches is from its streambuf object.|
|void||is.finish()||reads till the end of the stream and then closes is. (This is useful if Coder is a checksummer; the checksum is only verified after EOF has been read.)|