Skip to main content

Crate engramdb_core

Crate engramdb_core 

Source
Expand description

EngramDB core:与 IO 后端无关的布局、索引与批量 gather 原语。

设计基线(docs/design.md §3):

  • Store-I 原始表视图:行 = rowid → 分片/偏移;与真实 PLE checkpoint 一致的分片组织
  • badge 聚集:badge = BPows 行一组,按 4KB/2MB 对齐,行宽 row_bytes 固定
  • 直接寻址:rowid → (shard, badge_id, in_badge_row) 全部为整数除法一次

Re-exports§

pub use count_index::CountIndex;
pub use fnv::fnv64;
pub use layout::Layout;
pub use layout::RowExtent;

Modules§

count_index
I2 频率索引:rowid → count(排序键值对文件)与热集选择。
fnv
FNV-1a 64 位:系统二进制对拍校验(与 scripts/bitwise_check.py 一致)。
layout
布局:行宽、badge、分片划分(与真实 checkpoint 结构一致的参数化小实现)。
store
Store-I 的批量 gather:分片文件 + 行号 → 组装 [n, width] 缓冲区。