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
45
46
47
48
49
50
51
52
53
54
55
56
//! Long-distance-match (LDM) integration types for the optimal parser.
//!
//! Donor parity: mirrors `optLdm_t` and `rawSeq` from `zstd_opt.c`.
//! The optimal parser consumes pre-computed LDM sequences (one per long
//! match window) and weaves them into candidate selection via
//! `ldm_process_match_candidate`.
//!
//! Extracted from `match_generator.rs` as part of #111 Phase 1
//! (structural split). Names, fields, and derives are preserved;
//! visibility was opened to `pub(crate)` so `match_generator` can
//! import the relocated items through `super::opt::ldm::*`. The
//! matcher methods that operate on these types remain on
//! `HcMatchGenerator` for now. The actual LDM *matcher* (gear hash +
//! bucket table) is scoped for #111 Phase 5 (implements #18).
/// One raw LDM sequence: `lit_length` literal bytes followed by a back
/// reference of `match_length` bytes at the given `offset`.
pub
/// Cursor into a pre-computed list of [`HcRawSeq`] entries the optimal
/// parser walks over for the current block.
pub
/// Donor `optLdm_t` parity: the active LDM window relative to the
/// current block. `(start_pos_in_block, end_pos_in_block)` mark the
/// reachable slice; `UINT_MAX` (here `usize::MAX`) signals "no LDM
/// candidate currently in flight" so the default-constructed state never
/// vetoes regular candidates.
pub