https://github.com/bbqsrc/pathtrie
A specialised trie for paths in the style of a Patricia or radix trie, with optional optimised FST output
https://github.com/bbqsrc/pathtrie
fst patricia radix rust trie
Last synced: 6 months ago
JSON representation
A specialised trie for paths in the style of a Patricia or radix trie, with optional optimised FST output
- Host: GitHub
- URL: https://github.com/bbqsrc/pathtrie
- Owner: bbqsrc
- License: apache-2.0
- Created: 2020-07-27T09:01:40.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-29T11:03:43.000Z (over 4 years ago)
- Last Synced: 2025-03-29T00:11:53.786Z (6 months ago)
- Topics: fst, patricia, radix, rust, trie
- Language: Rust
- Homepage:
- Size: 37.1 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# pathtrie
[](https://docs.rs/pathtrie)
A specialised trie for paths in the style of a Patricia or radix trie, with optional optimised FST output.
The intended usage of this data structure is for optimally storing and querying keys that have a large number of shared prefixes, such as file paths in a file system.
This crate is partly inspired by the [`fst` crate by Andrew Gallant](https://github.com/BurntSushi/fst). There are a few significant differences to that crate, however:
- Simplicity of implementation was prioritised over speed
- The trie structure is mutable and can be later written into an FST
- Insertions do not need to be in lexicographical orderIt is a goal of this project to stabilise the FST format once proven to be bug-free.
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
pathtrie = "0.1"
```## Where is this used?
* [box](https://github.com/bbqsrc/box) - a modern replacement for the zip file format
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)at your option.