io.encodings.string: faster decode by using sbufs.

db4
John Benediktsson 2013-11-24 16:22:29 -08:00
parent 13ec450ac8
commit 473fdc0d84
1 changed files with 2 additions and 4 deletions

View File

@ -12,11 +12,9 @@ IN: io.encodings.string
byte-array byte-array>string-fast
] [
byte-array encoding <byte-reader> :> reader
byte-array length
encoding guess-decoded-length
reader stream-exemplar-growable new-resizable :> buf
byte-array length encoding guess-decoded-length <sbuf> :> buf
[ reader stream-read1 dup ] [ buf push ] while drop
buf reader stream-exemplar like
buf "" like
] if
] if ; inline