Skip to content

match

match: (buffer?, searchBuffer?, options?) => object

Defined in: utils/buffers/match.js:31

Searches for all occurrences of searchBuffer in buffer using KMP.

any = ...

The buffer to search within

any

The byte pattern to search for

KMP search options

number = Infinity

Maximum matches to return

number[]

Pre-computed KMP failure function table

number = 0

KMP partial match state from a prior chunk

object

  • Match result with indices, partial state, and lookup table

lookup: number[]

matches: number[]

partial: number