1 ! Copyright (C) 2008 Daniel Ehrenberg.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: io io.streams.byte-array ;
4 IN: io.encodings.string
6 : decode ( byte-array encoding -- string )
7 <byte-reader> contents ;
9 : encode ( string encoding -- byte-array )
10 [ write ] with-byte-writer ;