Zig 0.15.1 reader: takeByte() with zero-sized buffer?

Is there an alternative to takeByte() that doesn’t require a buffered reader?

It looks like it has been deliberately omitted to encourage buffering, otherwise people may use some takeByteUnbuffered() in a loop with their own buffering, which would be worse that using the existing buffering capability.

Can you use readSliceAll with buffer argument of length 1?

1 Like

I guess readVec() will work even if internal buffer of reader is &.{}