| Method | What it does |
| ByteSearch.compileSequence(query, mode) | A pattern: "hex" byte pairs with ?? wildcards, or UTF-8 text ("text", or "texti" ignoring ASCII case). |
| ByteSearch.nextMatch(bytes, pattern, from, direction) | { offset, wrapped }: the next match forwards (1) or backwards (-1), wrapping around; or null. |
| ByteSearch.compile(query, mode) | A pattern for find: "text" (ASCII case ignored) or "case" as UTF-8 and UTF-16LE, "hex" bytes, or "regex" on the bytes read as UTF-8. Throws an Error with a readable message for a bad query. |
| ByteSearch.find(bytes, pattern, limit) | [{ offset, length, label }], sorted by offset, at most limit per encoding (the archive pages' Search contents). |
| ByteSearch.context(bytes, offset, length) | The text around a match, with the match's position in it. |