split_conn was never set and GATT writes targeted handle 0 — every
remote string fetch returned -ENOTCONN, so all strokes fell back to
raw steno. Central now: tracks the peripheral link via connection
callbacks (role filter), discovers the steno service / request
characteristic / CCC, subscribes for notifications, and writes to
the discovered handle. Peripheral characteristic gains
WRITE_WITHOUT_RESP. split_dict self-initializes via SYS_INIT.
Zephyr bundles no zlib — the CONFIG_ZLIB select was a no-op and the
string path returned errors on device. src/inflate.c: minimal raw
DEFLATE (RFC 1951) decompressor, no allocation; one code path for
host and Zephyr. Host round-trip: 42,000 vectors through the real
compiled blobs, 0 mismatches.
Spare slots (1.23x) doubled binary size → reverted to v2 (no spare
slots, entry_count == slot_count). CHD now uses entry_count/4
buckets and 1M displacement tries instead of 65K. No trimming.
Removed all trimming/auto-trim logic. Build fails if compiled dict
exceeds flash budget. CHD now uses spare slots (1.23x load factor)
and fewer buckets (entry_count/5) for reliable construction at any
entry count. Binary format bumped to v3: header stores slot_count
and entry_count separately.
Partition: ratio-based split overloaded right side (113K entries →
875KB estimate → heavy trimming to 58K). Now uses 4.5 bytes/entry
from benchmark data → ~34K left, ~113K right, both fit budgets.
CHD: 1:1 bucket ratio (entry_count buckets) prevents hash collision
failures on large partitions. Most buckets have 1 key → trivial
placement. Displacement array grows but still small.
Central has more code overhead (behavior, formatter, output, undo,
BLE client) → smaller dict budget. Peripheral is lean → gets bulk
of dict. Ratio-based partition replaces fixed bytes-per-entry estimate.
Full 147K Plover dict, zero trimming target.
Importance-based partitioning — highest-importance entries on left
(central) for zero-latency local lookup, remainder on right
(peripheral) queried over BLE on miss. Both halves embed their own
MPHF binary. Configurable block size for tighter compression.