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

Variable length keys. #11

Description

@lantame

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions