BurntSushi / fst

Represent large sets and maps compactly with finite state transducers.
The Unlicense
1.78k stars 126 forks source link

Generic FST outputs #124

Closed tapeinosyne closed 3 years ago

tapeinosyne commented 3 years ago

First off, thanks for creating and maintaining this crate! It has proved itself an outstanding tool for dealing with large data sets on my old, RAM-limited machine.

As for the issue, I have two small use cases where I would like an output other than u64. (Specifically char and u16 or u32.) The documentation mentions that generic output types are a possibility for future versions of fst, and I'd like to see them implemented.

Would you be willing to accept PRs working towards that goal?

BurntSushi commented 3 years ago

See https://github.com/BurntSushi/fst/pull/21 and https://github.com/BurntSushi/fst/issues/90

In short, no, I would be unlikely to accept such a change. Moreover, in your case, the change wouldn't buy you much relative to the complexity of the change itself. Both a char and a u16 can be represented by a u64. Such a generalization is much more useful for things too big to fit into a u64.