1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors
//! Compressed-domain search: equality, prefix, and substring queries answered
//! directly over the code stream, without decoding rows back to bytes.
//!
//! The dictionary's invariants are what make this sound:
//!
//! * **Sorted** — tokens are in bytewise-lexicographic order, so a needle can be
//! tokenized ([`tokenize`](tokenize())) and prefix-ranged ([`prefix_range`]) by
//! binary search.
//! * **Complete** — all 256 single-byte tokens are present, so any query string
//! is encodable into codes.
//! * **Unique** — no two tokens are equal, so distinct code sequences denote
//! distinct strings; equality then reduces to comparing code slices.
//!
//! # Shape
//! Each query is **prepared once** (tokenize the needle, or build a transition
//! table) into immutable data, then applied per row by a **free function over a
//! `&[`[`Token`](crate::Token)`]`**. The row to scan is
//! [`ColumnView::row_codes`](crate::ColumnView::row_codes), but the predicates
//! take any code slice, so a caller can scan a prefiltered subset of rows
//! rather than the whole column.
//!
//! # Operations
//! * [`tokenize`](tokenize()) — segment a needle into its canonical code sequence.
//! * [`equals`](equals()) — rows equal to a needle.
//! * [`starts_with`] — rows beginning with a needle, via a prepared
//! [`PrefixQuery`].
//! * [`contains`](contains()) — rows containing a pattern, via a precomputed
//! token-level KMP [`ContainsTable`].
//! * [`prefix_range`] — the sorted-dictionary primitive prefix search builds on.
pub use ;
pub use equals;
pub use prefix_range;
pub use ;
pub use tokenize;