diff options
| author | Igor Anić <igor.anic@gmail.com> | 2024-02-21 20:01:45 +0100 |
|---|---|---|
| committer | Igor Anić <igor.anic@gmail.com> | 2024-02-21 20:01:45 +0100 |
| commit | d9950298444c3a3c9d2e5ec7efbf45e722bbed02 (patch) | |
| tree | 7b59aa80aa28946b42b3f223b4efe7b7898696c3 /lib/std/Random | |
| parent | 955fd65cb1705d8279eb195bdbc69810df1b1d98 (diff) | |
| download | zig-d9950298444c3a3c9d2e5ec7efbf45e722bbed02.tar.gz zig-d9950298444c3a3c9d2e5ec7efbf45e722bbed02.zip | |
add BufferedTee
BufferedTee provides reader interface to the consumer. Data read by consumer
is also written to the output. Output is hold lookahead_size bytes behind
consumer. Allowing consumer to put back some bytes to be read again. On flush
all consumed bytes are flushed to the output.
input -> tee -> consumer
|
output
input - underlying unbuffered reader
output - writer, receives data read by consumer
consumer - uses provided reader interface
If lookahead_size is zero output always has same bytes as consumer.
Diffstat (limited to 'lib/std/Random')
0 files changed, 0 insertions, 0 deletions
