wc-Go counting room

every character accounted for — including the one cut in half source ↗

Input

CHUNK 16 bytes

The real thing reads 32KB chunks; here they are tiny so you can watch the seams. The interesting moment is a multi-byte character cut by a chunk edge — the red carry hands its head bytes to the next chunk, and the counts come out right anyway. Verified against coreutils by a 59-case differential suite.

The stream

LINES
0
-l
WORDS
0
-w
BYTES
0
-c
CHARS
0
-m
stream something —