Stream.Leftmost_longestNon-overlapping leftmost-longest matches — the find_leftmost_longest selection, streamed.
This selection needs lookahead: a match may only be reported once no longer match starting at or before it can still arrive. Because no match exceeds the longest pattern, that lookahead is bounded: a match is reported by the first Leftmost_longest.feed whose input reaches one longest-pattern length past the match's start, and the state buffers at most that window of candidates. Call Leftmost_longest.flush at end of input for the rest.
The state retains at most one candidate per start in that window, but no input bytes. feed does not materialise or sort all overlapping matches.
The matches selected so far, in order, with absolute offsets.
The remaining matches at end of input. The stream is finished: do not feed the state again.
val pos : state -> intTotal bytes fed so far.