Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Variable length keys. #11

Open
lantame opened this issue Mar 9, 2015 · 0 comments
Open

Variable length keys. #11

lantame opened this issue Mar 9, 2015 · 0 comments

Comments

@lantame
Copy link

lantame commented Mar 9, 2015

Hello! I'm trying to set up PatriciaTrie as container for IP-table. But unfortunately there's a bug (or feature) in implementation: it does not make any difference between empty sequence of bits and a sequence of 0's.
Moreover, when i try to insert (byte array for simplicity)
trie.put(new byte[]{0}, 5);
trie.put(new byte[]{0,0,0}, 10);
trie.get(new byte[]{0})
It returns 10, so the root is moved to second node and data at first node is discarded. Unfortunately, such behavior is coded deeply inside Trie and cannot be changed by creating custom Analyzer :-(
Do you have any suggestions for me to get real variable-length keys working? Thank you in advance.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant