export interface PatternSearchTarget { indexOfPattern(pattern: Uint8Array, startIndex: number): number; } /** * Stateful helper for incremental pattern scanning in growing buffers. * * The scanner tracks a `searchFrom` cursor and an `overlap` region so callers * can avoid rescanning bytes that cannot start a match. */ export declare class PatternScanner { readonly pattern: Uint8Array; readonly overlap: number; searchFrom: number; constructor(pattern: Uint8Array); /** Find the next match index starting at the current `searchFrom`. */ find(target: PatternSearchTarget): number; /** Update `searchFrom` after consuming `consumed` bytes from the front. */ onConsume(consumed: number): void; /** Update `searchFrom` after a no-match scan on a buffer of length `bufferLength`. */ onNoMatch(bufferLength: number): void; }