• Cooperative twin of buildIndexStreaming: identical parse, window and grow-and-restart behaviour (mirrored the same way the parser mirrors parseDataBlock/parseDataBlockAsync), but the parse periodically yields to the event loop so browsers repaint progress UI mid-parse instead of flagging the tab as stalled (issue #301 ยง2 for the streamed path).

    Type Parameters

    • TypeIDType

    Parameters

    • source: ByteSource

      The byte source.

    • parser: default<TypeIDType>

      The STEP parser (typed to the schema).

    • pool: number

      Target window size in bytes.

    • OptionalonRecordIndexed: ((localID: number, expressID: number, typeID: undefined | TypeIDType) => void)

      Optional per-record event (see buildIndexStreaming).

        • (localID, expressID, typeID): void
        • Parameters

          • localID: number
          • expressID: number
          • typeID: undefined | TypeIDType

          Returns void

    • Optionalsink: StepIndexSink<TypeIDType>

      Optional index sink (columnar builds).

    • OptionalonProgress: ((absoluteByteCursor: number) => void)

      Optional progress callback with the ABSOLUTE source byte cursor (unlike the parser's window-relative cursor), so callers can report cursor / source.byteLength directly.

        • (absoluteByteCursor): void
        • Parameters

          • absoluteByteCursor: number

          Returns void

    • OptionalyieldIntervalMs: number

      Minimum ms between event-loop yields.

    Returns Promise<StreamingIndexResult<TypeIDType>>

    The index, header, result and diagnostics.