{"id":20564249,"url":"https://github.com/nlnetlabs/try-tries-and-trees","last_synced_at":"2025-05-09T17:33:16.839Z","repository":{"id":64403586,"uuid":"344169065","full_name":"NLnetLabs/try-tries-and-trees","owner":"NLnetLabs","description":null,"archived":true,"fork":false,"pushed_at":"2022-12-09T16:35:59.000Z","size":14778,"stargazers_count":19,"open_issues_count":0,"forks_count":6,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-21T17:56:33.070Z","etag":null,"topics":["routing-algorithm","rust","tree-structure","trie-tree"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NLnetLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-03T15:15:17.000Z","updated_at":"2024-05-14T10:33:56.000Z","dependencies_parsed_at":"2022-12-13T15:53:27.195Z","dependency_job_id":null,"html_url":"https://github.com/NLnetLabs/try-tries-and-trees","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLnetLabs%2Ftry-tries-and-trees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLnetLabs%2Ftry-tries-and-trees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLnetLabs%2Ftry-tries-and-trees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLnetLabs%2Ftry-tries-and-trees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NLnetLabs","download_url":"https://codeload.github.com/NLnetLabs/try-tries-and-trees/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253295834,"owners_count":21885707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["routing-algorithm","rust","tree-structure","trie-tree"],"created_at":"2024-11-16T04:25:01.978Z","updated_at":"2025-05-09T17:33:12.005Z","avatar_url":"https://github.com/NLnetLabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# try-tries-and-trees\n\nThis is the ~~experimental~~ research Tries and Trees IP Lookup repository.\n\nCurrently we have for you:\n\n- A simple binary Trie. It can be run by invoking `cargo run --release --example simpletrie`, \n`cargo run --release --example trie4` for a IPv4 trie and `cargo run --release --example trie6`.\n- A Treebitmap, can be run likewise: `cargo run --release --example bittreemap`.\n\nThere are also two very crude REPL examples, that take csv files as input:\n- `cargo run --release --example load_csv_treebitmap -- ./data/uniq_pfx_asn.csv` for the Treebitmap and\n- `cargo run --release --example load_csv -- ./data/uniq_pfx_asn.csv` for the simple trie.\n\nThe `./data/uniq_pfx_asn.csv` is derived from a RisWHOIS file and thus approximates a full table.\n\nOn the REPL the only thing you can do is:\n`s \u003cPREFIX/LEN\u003e`\n\n## Treebitmap\n\nThe new() constructor of both treebitmaps takes an vec with strides. You can specify a full stride vec, like so:\n`vec![6, 6, 6, 4, 4]` or by specifying a vec like so `vec![8]`. It will fill up with 8 untill it reaches the requested number of bits (32 for IPv3, 128 for IPv6).\n\nPossible stride sizes are 3,4,5,6,7,8\n\nThere are two treebitmaps, one that stores prefixes internally in the tree (a vec per node) and a treebitmap that stores it in a global Vec\u003cPrefix\u003e.\n\n## Benchmarks\n\nex.:\n```cargo test --release tests::csv_test_treebitmap::test -- --show-output --test-threads=1```\n\nDo not forget ``---release``, otherwise it will panic, because the timer will overflow!\n\nEnjoy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlnetlabs%2Ftry-tries-and-trees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlnetlabs%2Ftry-tries-and-trees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlnetlabs%2Ftry-tries-and-trees/lists"}