io.encodings.string: faster decode by using sbufs.
parent
13ec450ac8
commit
473fdc0d84
|
@ -12,11 +12,9 @@ IN: io.encodings.string
|
||||||
byte-array byte-array>string-fast
|
byte-array byte-array>string-fast
|
||||||
] [
|
] [
|
||||||
byte-array encoding <byte-reader> :> reader
|
byte-array encoding <byte-reader> :> reader
|
||||||
byte-array length
|
byte-array length encoding guess-decoded-length <sbuf> :> buf
|
||||||
encoding guess-decoded-length
|
|
||||||
reader stream-exemplar-growable new-resizable :> buf
|
|
||||||
[ reader stream-read1 dup ] [ buf push ] while drop
|
[ reader stream-read1 dup ] [ buf push ] while drop
|
||||||
buf reader stream-exemplar like
|
buf "" like
|
||||||
] if
|
] if
|
||||||
] if ; inline
|
] if ; inline
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue