FLEXI-STREAMS implements "virtual" bivalent streams that can be layered atop real binary or bivalent streams and that can be used to read and write character data in various single- or multi-octet encodings which can be changed on the fly. It also supplies in-memory binary streams which are similar to string streams. . FLEXI-STREAMS is currently not optimized towards performance - it is rather intended to be easy to use and (if possible) to behave correctly.