the.bay.news

Io.Reader: How to read an unknown-size line in a file?

Ziggit
Io.Reader: How to read an unknown-size line in a file?
Hi! I’ve been studying the Io.Reader implementation. I really like its zero-copy [1] API: take, toss, and peek. That said, I’m struggling to understand how to use Io.Reader in this scenario: I need to read an unknown-size line in a file. Because the line size is unknown, I can’t guarantee that my .buffer will be big enough. I was expecting Io.Reader to have a way of filling a buffer until a delimiter is detected. Maybe something like Io.Reader.readSliceDelimiterExclusive()? But I can’t s...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.