Rust中有限状态转换器(FST)的实现fst Crate
fst库是"使用Automata和Rust索引1,600,000,000Keys"作者所建立的实现其博客思想的库。作者文章的后续就是针对其博客思想的构建历程,我们在这里先插入一下作者实现的这个库的一些主要功能,方便理解作者后续的思想。原文地址 fst是一个用于有效存储和搜索有序集合或者key是字符串的map的库。这个crate的一个关键设计目标是支持存储和搜索非常大的集合或map(即数十亿)。这意味着已经付出了很多努力来确保所有操作都是内存高效的。 fst is a library for efficiently storing and searching ordered sets or maps where the keys are byte strings. A key design goal of this crate is to support storing and searching very large sets or maps (i.e., billions). This means that much effort has gone in to making sure that all operations are memory efficient. 集合和映射由有限状态机(FSA)表示,它是一种对key中公共前缀和后缀的压缩形式。此外,有限状态机可以有效的对自动机(如正则表达式或模糊查询的Levenshtein距离)或字典范围进行查询。 Sets and maps are represented by a finite state machine, which acts as a form of compression on common prefixes and suffixes in the keys....