2008-03-06 01:23:38 -05:00
|
|
|
! Copyright (C) 2008 Daniel Ehrenberg.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2008-03-05 20:12:40 -05:00
|
|
|
USING: io io.streams.byte-array ;
|
2008-03-05 18:41:25 -05:00
|
|
|
IN: io.encodings.string
|
|
|
|
|
2008-03-05 20:12:40 -05:00
|
|
|
: decode ( byte-array encoding -- string )
|
2009-05-01 11:41:27 -04:00
|
|
|
<byte-reader> stream-contents ;
|
2008-03-05 20:12:40 -05:00
|
|
|
|
|
|
|
: encode ( string encoding -- byte-array )
|
|
|
|
[ write ] with-byte-writer ;
|